(no title)
kirici | 7 months ago
How? Unassigned
foo := myFunc() # [...] assignment mismatch: 1 variable but myFunc returns 2 values
Assigned, but not used foo, bar := myFunc()
fmt.Println(foo) # [...] declared and not used: bar
Intentionally ignored foo, _ := myFunc()
Ignoring is a deliberate decision and trivial to review, lint and grep for.Except for, I suppose, shadowing a variable before checking it
foo, bar := myFunc()
_, bar = myFunc()
fmt.Println(foo, bar)
Which is more of a general grievance of quite some people, but I don't think that has much to do with multiple returns - and you definitely have to look at the error to pave over it afterwards.
brabel|7 months ago