I guess the downside is that consumers can also alter the value of Init.

You want something like a "const" which can be initialized at runtime, 
which doesn't exist in Go. The solution generally is to make a public 
accessor function to a hidden variable, and that is the "var sdlInit" in 
your original code.

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/2f89adda-8920-4e50-9976-55d403e69f63n%40googlegroups.com.

Reply via email to