Hi, Newbie here. I am trying to understand the scope of variables in go - I ran across an interesting situation and want to learn what is going on. Why do these two functions yield different results: https://play.golang.org/p/SyyWOY3fXz
My understanding was that declaring myint either way in the function was the same as far as scope is concerned - but obviously they are different somehow. Do variables declared in the functions return section have a larger scope or live longer? Or is something else going on here? Just trying to understand what's going on. Thanks! -- 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.