jet/internal/utils/errfmt/errfmt.go

11 lines
215 B
Go
Raw Normal View History

2023-07-21 13:20:44 +02:00
package errfmt
import (
"strings"
)
// Trace returns well formatted wrapped error trace string
func Trace(err error) string {
return "Error trace:\n" + " - " + strings.Replace(err.Error(), ": ", ":\n - ", -1)
}