MCPcopy Create free account
hub / github.com/coder/slog / errorChain

Function errorChain

map.go:148–163  ·  view source on GitHub ↗
(f xerrors.Formatter)

Source from the content-addressed store, hash-verified

146}
147
148func errorChain(f xerrors.Formatter) []interface{} {
149 var errs []interface{}
150
151 next := error(f)
152 for {
153 f, ok := next.(xerrors.Formatter)
154 if !ok {
155 errs = append(errs, next)
156 return errs
157 }
158
159 p := &xerrorPrinter{}
160 next = f.FormatError(p)
161 errs = append(errs, p.e)
162 }
163}
164
165type wrapError struct {
166 Msg string `json:"msg"`

Callers 1

encodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected