(prefix string)
| 3 | type Option func(*ErrorContext) |
| 4 | |
| 5 | func WithPrefix(prefix string) Option { |
| 6 | return func(ec *ErrorContext) { |
| 7 | if len(ec.prefix) > 0 { |
| 8 | ec.prefix = prefix + ": " + ec.prefix |
| 9 | return |
| 10 | } |
| 11 | ec.prefix = prefix |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | func WithStatusCode(code int) Option { |
| 16 | return func(ec *ErrorContext) { |
no outgoing calls
no test coverage detected