you want fmt.Errorf
GODDAMNIT.That was crazy fast, I'm ashamed of this but I have to admit I wouldn't look for it on fmt, maybe it's just me.
I would like to see a MultiError type in the errors package, which is some boilerplate people write over and over:
type MultiError []Error
func (e MultiError) Error() string {
// ...
}
See: https://code.google.com/p/appengine-go/source/browse/appengine/errors.go#33
-- rodrigo
It's somewhat surprising. The errors package is used a lot and
including Errorf in errors would mean pulling fmt and its dependencies
into pretty much everything.
In the documentation of the errors package the second example is for
Errorf, but then again the example in the package overview uses
fmt.Sprintf with errors.New. The documentation could be clearer, maybe
mentioning fmt.Errorf in the package overview. You could file an issue
to clarify the documentation.
--
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/groups/opt_out.