MarshalIdentifier can be optionally implemented to control marshaling of the primary field to a string. The order of operations for marshaling the primary field is: 1. Use MarshalIdentifier if it is implemented 2. Use the value directly if it is a string 3. Use fmt.Stringer if it is implemented 4.
| 372 | // 3. Use fmt.Stringer if it is implemented |
| 373 | // 4. Fail |
| 374 | type MarshalIdentifier interface { |
| 375 | MarshalID() string |
| 376 | } |
| 377 | |
| 378 | // UnmarshalIdentifier can be optionally implemented to control unmarshaling of the primary field from a string. |
| 379 | // |
no outgoing calls
no test coverage detected