-
var name T
andname := new(T)
initializes with the zero value for T.[1] -
One thing to remember is that arguments are always copied in Go.[1]
-
There's no casting, only convertion.
var foo string; bar := []bytes(string)
is a convertion. -
This is very useful: https://github.com/golang/go/wiki/CodeReviewComments
-
And this is useful: http://peter.bourgon.org/go-in-production/
-
This is when you should use
new
: http://play.golang.org/p/-VfcIz8N2o
References 1 - http://www.golang-book.com/9/index.htm