Is there a Go interface in the standard library with:
String() string
?
(Similar to how Java has toString() on java.lang.Object)
Perhaps I just didn't search enough but I didn't see one. Wanted to use one that already exists rather than than making my own (though I guess it really makes no difference with Go's type system).
implementstool to answer questions of this form. In this case, you'd find any package that has structs withString()methods, say,time, which has quite a few, and then runimplements -types time, and look at the interfaces it says are implemented by the varioustimetypes.