Errorf formats according to a format specifier and returns the string as a value that satisfies error. Errorf also records the stack trace at the point it was called.
(format string, args ...interface{})
| 110 | // as a value that satisfies error. |
| 111 | // Errorf also records the stack trace at the point it was called. |
| 112 | func Errorf(format string, args ...interface{}) error { |
| 113 | return &fundamental{ |
| 114 | msg: fmt.Sprintf(format, args...), |
| 115 | stack: callers(), |
| 116 | } |
| 117 | } |
| 118 | |
| 119 | // fundamental is an error that has a message and a stack, but no caller. |
| 120 | type fundamental struct { |
searching dependent graphs…