Posts tagged “go”
3 posts Subscribe by RSS
3 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.
Go defer: when arguments are evaluated, what order calls run in, and how results change
Go's defer evaluates arguments when the defer statement runs and calls deferred functions in reverse order just before the function returns. Here is why that lets them change named results.
No posts match. Try another word.