String is for testing.
()
| 74 | |
| 75 | // String is for testing. |
| 76 | func (err *error_) String() string { |
| 77 | if err.empty() { |
| 78 | return "no error" |
| 79 | } |
| 80 | return fmt.Sprintf("%s: %s", err.pos(), err.msg(nil)) |
| 81 | } |
| 82 | |
| 83 | // errorf adds formatted error information to err. |
| 84 | // It may be called multiple times to provide additional information. |