-
Notifications
You must be signed in to change notification settings - Fork 199
Closed
Description
Allow specifying directives for (external) types that support BinaryMarshaler + BinaryUnmarshaler and optionally BinaryAppender.
//msgp:binmarshal pkg.Type pkg.Type2will use BinaryMarshaler/BinaryUnmarshaler.//msgp:binappend pkg.Type pkg.Type2will use BinaryAppender/BinaryUnmarshaler.
Serialized data will be added an bin data, no special header.
I guess we could also add the text interfaces. But the user would probably need to specify the storage type...
//msgp:textmarshal pkg.Type pkg.Type2will use TextMarshaler/TextUnmarshaler; data saved as bin (default)//msgp:textappend pkg.Type pkg.Type2will use TextAppender/TextUnmarshaler; data saved as bin (default)//msgp:textmarshal as:string pkg.Type pkg.Type2will use TextMarshaler/TextUnmarshaler; data saved as string.//msgp:textappend as:string pkg.Type pkg.Type2will use TextAppender/TextUnmarshaler; data saved as string.
Missing anything, suggestions?
Metadata
Metadata
Assignees
Labels
No labels