Orso Labs

Filtering for "golang"

Remove filter
Default values in JSON with Golang
How to handle JSON fields with a default value different from the Go zero value (example: a bool with default value true), avoiding the inconveniences of pointers.
Handling errors only once and logging them with full context in Golang
Handling error only once means that we log them at the place of handling, not at the place of occurrence. But how do we do this while providing to the structured log the full context of key/value pairs that is available only at the place of occurrence?
Building Go code, with and without Go modules, with Concourse
Before the introduction of Go Modules with Go 1.11, building Go code required to follow the peculiar directory structure of GOPATH. We show how to build Go code, wether it already supports go.mod or not, with Concourse.