The Non-Obvious properties of JSON Encoder.Encode directly to http.ResponseWriter Today I came across the following code snipped in a golang HTTP handler: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 import( "encoding/json" …
On Errors in Golang In Golang are two ways to signal an error in a function or method. The first is the convention to return an error value as last return …
Mount Local GOPATH Directory into Container Given you have an old golang project depending on the GOPATH. You want to build that project in the golang docker image. This one liner …