Standard struct for general types of errors. For an example of custom error type, look at databaseError/newDatabaseError in errors_test.go.
| 52 | // For an example of custom error type, look at databaseError/newDatabaseError |
| 53 | // in errors_test.go. |
| 54 | type baseError struct { |
| 55 | msg string |
| 56 | inner error |
| 57 | |
| 58 | stack []uintptr |
| 59 | framesOnce sync.Once |
| 60 | stackFrames []runtime.Frame |
| 61 | } |
| 62 | |
| 63 | // This returns the error string without stack trace information. |
| 64 | func GetMessage(err interface{}) string { |
nothing calls this directly
no outgoing calls
no test coverage detected