4 ms·
And you might like: if _, err := somethingThatFails(arg); err != nil { return fmt.Errorf("failed with arg=%v, %v", arg, err) }
by benmanns 13y ago
And you might like:
if _, err := somethingThatFails(arg); err != nil {
return fmt.Errorf("failed with arg=%v, %v", arg, err)
}
- AYBABTME 13y agoIn that case I was ignoring the returned value for the sake of the example, otherwise you lose the declaration when it's in a `if`.