Golang Reading and Notes for April 2014
27 Apr 2014 , tagged: Go, Golang, Reading List
Last week I attended the Toronto Golang Usergroup Meetup and it was plenty of fun. If you’re in or near Toronto and like to dabble with Go, come out. Oh, and did I mention free pizza? Notes Casting in Go is slightly different than in C related languages. Instead of a cast, you perform a type conversion: var myVariable SomeGenericType = ... casted, ok := myVariable.(MoreSpecificType) // ok is a bool if ok { // Type conversion successful } else { // myVariable does not implement MoreSpecificType } The range keyword when used with two return values does not return references, but rather copies.