()
| 48 | } |
| 49 | |
| 50 | func ExampleError_GRPCStatus() { |
| 51 | err := errors.New("my stuff is missing") |
| 52 | unifiedError := unierr.Wrap(err, codes.NotFound) |
| 53 | |
| 54 | grpcStatus := unifiedError.GRPCStatus() |
| 55 | fmt.Println(grpcStatus.Code()) |
| 56 | fmt.Println(grpcStatus.Message()) |
| 57 | // Output: |
| 58 | // NotFound |
| 59 | // my stuff is missing |
| 60 | } |
nothing calls this directly
no test coverage detected