https://github.com/golang/go/issues/21355, this is the issue i am reffering to.
On Monday, May 25, 2020 at 10:38:31 PM UTC+5:30, Jake Montgomery wrote: > > On Sunday, May 24, 2020 at 3:46:54 PM UTC-4, adithya...@gmail.com wrote: >> >> if i am not wrong, Even the main itself is a go routine, which have >> global variables? >> > > Perhaps you should describe a bit more what you mean? People seem to be > making assumptions that you meant something different that what you > actually said. Assuming you are referring to the main() function, then, no > it is not a goroutine, but it does run in a goroutine. However, main() doe > not "have" global variables. Can you give an exmaple of what you mean by > this? > > Global variables belong to the package, and are accessible from *any > *goroutine > in the package, if they are private, and from any goroutine anywhere if > they are public. > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/4ace5c86-1895-4090-90ff-68be45454bdf%40googlegroups.com.