When hooks are enabled, RequiredNotSetError is typed alias to internal/proto package. Binary serialization has not been wrapped yet and hence produces requiredNotSetError instead. This function is a work-around to identify both aliased and non-aliased types.
(err error)
| 130 | // requiredNotSetError instead. This function is a work-around to identify both |
| 131 | // aliased and non-aliased types. |
| 132 | func isRequiredNotSetError(err error) bool { |
| 133 | e, ok := err.(interface{ RequiredNotSet() bool }) |
| 134 | return ok && e.RequiredNotSet() |
| 135 | } |
| 136 | |
| 137 | // Simple tests for numeric encode/decode primitives (varint, etc.) |
| 138 | func TestNumericPrimitives(t *testing.T) { |
no test coverage detected