pkg / errors

Simple error handling primitives
https://godoc.org/github.com/pkg/errors
BSD 2-Clause "Simplified" License
8.18k stars 691 forks source link

Proposal: add option to change delimiter #207

Open tamiraviv opened 5 years ago

tamiraviv commented 5 years ago

When using errors.Wrap the default delimiter is ": ". But for me at least it seem like it should be "| ", with that I can wrap errors like this:

errors.Wrapf(err, "Error while trying to open file: %s", fileName)

I thing that instead of hard-coded delimiter we should be able to configure it with:

errors.SetDelimiter (string)