errProtoCodec wraps the proto codec and delegates to it if it is configured to return a nil error. Else, it returns the configured error.
| 86 | // errProtoCodec wraps the proto codec and delegates to it if it is configured |
| 87 | // to return a nil error. Else, it returns the configured error. |
| 88 | type errProtoCodec struct { |
| 89 | name string |
| 90 | encodingErr error |
| 91 | decodingErr error |
| 92 | } |
| 93 | |
| 94 | func (c *errProtoCodec) Marshal(v any) (mem.BufferSlice, error) { |
| 95 | if c.encodingErr != nil { |
nothing calls this directly
no outgoing calls
no test coverage detected