RegisterLeafEncoder can be used to register new leaf error types to the library. Registered types will be encoded using their own Go type when an error is encoded. Wrappers that have not been registered will be encoded using the opaqueLeaf type. Note: if the error type has been migrated from a prev
(typeName TypeKey, encoder LeafEncoder)
| 126 | // or a different type, ensure that RegisterTypeMigration() was called |
| 127 | // prior to RegisterLeafEncoder(). |
| 128 | func RegisterLeafEncoder(typeName TypeKey, encoder LeafEncoder) { |
| 129 | errbase.RegisterLeafEncoder(typeName, encoder) |
| 130 | } |
| 131 | |
| 132 | // LeafEncoder is to be provided (via RegisterLeafEncoder above) |
| 133 | // by additional wrapper types not yet known to this library. |
nothing calls this directly
no test coverage detected
searching dependent graphs…