Redo error-formatting utilities to be a bit more idiomatic #118
Labels
good first issue
Good for newcomers
help wanted
Issues that anyone could pick up and implement if useful to them
internal
We have our own
errorf
(ingenerate/errors.go
) so that we can do structured errors with positions. But ourerrorf
is a bit un-idiomatic (which caused confusion in #117) -- it just wraps the firsterror
argument it finds rather than using%w
-- and it also doesn't actually format wrapped errors in a very good way (e.g. here). We could probably do better, either having our wrapper do an ordinaryfmt.Errorf
(by formatting the position at call-time), or by making it a bit more idiomatic and using its extra structure to hoist the position to the outermost error.The text was updated successfully, but these errors were encountered: