Re:Go Developer Survey 2022 Q2 Results
by metaltyphoon on Thursday September 08, 2022 @04:09PM
(#32771364)
Or perhaps allow variable assignment to be used in the same scope.
if x, err := someMethod(); err != nil { return err }
x <- is usable here.
IMO they could exactly use what you wrote, ie. change gofmt to have it all on one line like that. The biggest annoyance with the error return boilerplate is the waste of vertical space and just squashing it into 1 line would fix that.