MCPcopy
hub / github.com/purpleidea/mgmt / String

Function String

util/errwrap/errwrap.go:124–129  ·  view source on GitHub ↗

String returns a string representation of the error. In particular, if the error is nil, it returns an empty string instead of panicking.

(err error)

Source from the content-addressed store, hash-verified

122// String returns a string representation of the error. In particular, if the
123// error is nil, it returns an empty string instead of panicking.
124func String(err error) string {
125 if err == nil {
126 return ""
127 }
128 return err.Error()
129}

Callers 2

constructorMethod · 0.85
TestString1Function · 0.85

Calls 1

ErrorMethod · 0.45

Tested by 1

TestString1Function · 0.68