/explore

Click through on any links that interest you or select the planets on the right to continue exploring the Outer Web.
You are here

blog.carlana.net
| | hjr265.me

I wanted to list all the time zones in Go. The standard library in Go comes with the time package. It also comes with the time/tzdata package. The standard time package in Go is very well-thought-out. It makes date-time manipulation deceptively simple. Yet, I could not find a way to list all the time zones. Time Zone Database The documentation for time.LoadLocation describes how Go uses four sources of time zone data:
6.1 parsecs

Travel
| |
| | rednafi.com

Track dev dependencies like golangci-lint in go.mod with a tools.go file and build tags to exclude them from production binaries.
7.1 parsecs

Travel
| |
| | www.uraimo.com

The GYB tool is used internally in Swift to simplify source files with many snippets of code that follow a common pattern. GYB provides some additional directives that are parsed by the tool to generate the final source files. This short tutorial describes how to use GYB in your own projects.
8.2 parsecs

Travel
| |
| | divan.dev

[AI summary] The author explains how understanding Go's internal data structure representations and memory management can help developers avoid common language gotchas like slice sharing and interface nil confusion.
27.6 parsecs

Travel
|