▲ | inlined 5 days ago | |||||||
You actually should never return a specific error pointer because you can eventually break nil checks. I caused a production outage because interfaces are tuples of type and pointer and the literal nil turns to [nil, nil] when getting passed to a comparator whereas your struct return value will be [nil, *Type] | ||||||||
▲ | stouset 4 days ago | parent [-] | |||||||
It's really hard to reconcile behavior like this with people's seemingly unshakeable love for golang's error handling. | ||||||||
|