That sounds like a very bad idea. You type assert to the wrong type and receive a valid blank value for that type. If you're lucky the program crahesh immedialy because the type's zero value is nil, if you're not the person program continues to execute using this types zero value for an unknown amount of time causing untold data corruption.
This is why go requires you to work hard for this behaviour by making the single value form of the expression the panicing default and the two value form harder to use accidentally. The same logic I described also applies to map lookup. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.