Re:Go: What We Got Right, What We Got Wrong
by campbel on Friday January 05, 2024 @01:55PM
(#38883046)
Also what I do. You could theoretically also create your own type that manages deserialization and includes an "is_set" field.
Re:Go: What We Got Right, What We Got Wrong
by euroderf on Saturday January 06, 2024 @03:37AM
(#38889682)
FWIW: calling Error() on a nil error is an obnoxious NPE fail, so I made this: https://pkg.go.dev/github.com/fbaube/miscutils#Errer
Use pointer variables ? Works 4 me.