|
|
|
|
|
by swort
3518 days ago
|
|
Typed vs untyped nil means that, in practice, all functions must return an error of type 'error', and force clients to downcast at runtime: https://golang.org/doc/faq#nil_error Of course, there are ways around this such as returning a struct, but then that's no longer compatible with the error interface. |
|
Which your struct can easily fulfill. That's the beauty of Go interfaces.