I always fall back on this pattern when the return values need to be used further down:
foo, err := doThing(bar)
if err != nil {
// handle error
}
foo2, err := doThing(bar)
if err != nil {
// handle error
}
Only one value in a multi-valued assignment has to be undeclared to use the short variable declaration operator (:=). If the variable already exists in the current scope and the type matches, it will get reused.