Re:Show HN: Gogit – Just enough Git (in Go) to push itself t...
by maccard on Sunday July 30, 2023 @04:48AM
(#36929213)
I'd like to join the weekend bitching. I do think go's errors are often shitty. Stacktraces are easy to get with [0] and you can always do fmt.Errorf("%s", string(debug.Stack()) to get them in an error. I've not profiled them in go, but in native code they're horribly inefficient to gather so you don't want to be using them unless you really want to I'd bet
That said, other applications have exceptions and people still manage to write functions that return a Boolean to indicate success, and log an equally unhelpful message rather than returning anything I can work with. Maybe we need new programmers.
That said, other applications have exceptions and people still manage to write functions that return a Boolean to indicate success, and log an equally unhelpful message rather than returning anything I can work with. Maybe we need new programmers.
[0] https://pkg.go.dev/runtime/debug#Stack