In your code, anything that implements thing also implements the error interface, which looks just like your thing interface. Printf knows to use the Error method if it is defined. See https://play.golang.org/p/JucIqt9H2FF. You will notice that with your code you can say:
var e error = t
demonstrating that t is in fact an error (was well as a thing).
-Paul
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I can't find anything saying as such