Hi all, suddenly I found the code package main import ( "fmt" )
var x=3 func main() { fmt.Println("Hello, playground") } It works fun, which surprised me. I mean, I get the idea that public global variable can be exported so it will not trigger "the declared but not used" error, but here x is a private variable: It cannot be used by other packages and it is not used anywhere, which to me seems to be a perfect match for an error. Did I miss something? Thanks in advance. -- 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.