Posts tagged “interface”
2 posts Subscribe by RSS
2 posts
Why a Go Pointer-Receiver Method Can Be Called but Doesn't Satisfy the Interface: Method Sets and Addressability
c.Inc() compiles, yet assigning c to an interface fails. This post uses the Go spec's method set and addressability rules to explain why, with map elements, embedding and method values.
Why a Go error holding a nil pointer is not nil
A Go interface value carries a dynamic type and a dynamic value. Why returning a nil pointer as an error makes err != nil true, safe return patterns, and the limits of checking.
No posts match. Try another word.