Earlier today my forgetful nature struck me again and I was trying to remember what the name is of the built-in Go interface for types that implement the String() method / func. It’s the Stringer interface in the fmt package. I figured I better make a quick post here so that I’ve got an easy place to check next time I forget. Truth is, now that I’ve written a post about it I probably won’t forget the next time. Year 12 chemistry exam all over again!
The source for the interface can be found at https://golang.org/src/fmt/print.go#L62.