demonstrating that t is in fact an error (was well as a thing).
-Paul
From: on behalf of Louki Sumirniy
Date: Tuesday, August 28, 2018 at 7:16 PM
To: golang-nuts
Subject: [go-nuts] Does fmt.Print* automatically render an error string in as
struct (play link)
I discovered quite by accident
I discovered quite by accident and now I can't find anything saying as
such, but this example
package main
import (
"fmt"
"errors"
)
type Thing struct {
err error
}
type thing interface {
Error() string
}
func (t *Thing) Error() string {
return t.err.Error()
}
func main() {
t :=