Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I did the first bullet point by passing a reference around, https://github.com/miniscruff/changie. The second bullet point is a little harder, cmd is sort of like a bin folder for scripts but as go files? In a way. I mostly use it cause that is what cobra defaults to. For the third one, besides speed and consistency it might be due to struct funcs when written using func (a *AStruct) doSomething() {} work both when passed in a pointer or value. Where as func (a AStruct) doSomething() {} only works when used on a value. The last point you can use errors.Is https://pkg.go.dev/errors#Is.
The source for Go's pkg site has been helpful to me https://github.com/golang/pkgsite