https://www.zarl.dev/posts/hal-by-any-other-name Here is my write up on my local model setup also have https://zarldev.github.io/zarlmono/ as my local 1st coding agent
HN user
zarldev
Yeah Gemma4 was and is great fun to do this with - I too am building pretty much the same as yourself in Go.
https://github.com/zarldev/zarl & https://www.zarl.dev/posts/hal-by-any-other-name
I stand corrected. Still you cannot implement an Is on a sentinel error and is only applicable to concrete error types. And if I'm using concrete types I'm going to us errors.As
In standard go you would not implement Is but would use the errors.Is call. How would this work if it is a sentinel error as you would use with errors.Is??
That's it mostly...
Whole kubernetes, docker, traefik and many other cloud native tools are written in go.
Yeah extending the struct tags to iota definitions would have made things much better.
the values are specified in the definition of the iota type.
``` type planet int // Gravity[float64],RadiusKm[float64],MassKg[float64],OrbitKm[float64],OrbitDays[float64],SurfacePressureBars[float64],Moons[int],Rings[bool] ```
This should be better now.
But all go generate does is run a binary like stringer? This can be used in go generate.
DSL? The go way is to use go generate I would say and it can be used with go:generate, I would like to use the AST lib to parse go files to remove the need for any json and to be more like the cmd stringer tool.
Hey did you read to the bottom of the article. It shows that that was just a temporary solution, the real invalid code is
func (t operation) IsValid() bool { _, ok := strOperationMap[s] return ok }
Tbh it has been updated to us an array instead for string indexing.