MCPcopy Index your code
hub / github.com/vmihailenco/msgpack / SetCustomStructTag

Method SetCustomStructTag

encode.go:148–150  ·  view source on GitHub ↗

SetCustomStructTag causes the Encoder to use a custom struct tag as fallback option if there is no msgpack tag.

(tag string)

Source from the content-addressed store, hash-verified

146// SetCustomStructTag causes the Encoder to use a custom struct tag as
147// fallback option if there is no msgpack tag.
148func (e *Encoder) SetCustomStructTag(tag string) {
149 e.structTag = tag
150}
151
152// SetOmitEmpty causes the Encoder to omit empty values by default.
153func (e *Encoder) SetOmitEmpty(on bool) {

Callers 3

TestUseJsonTagFunction · 0.95
TestUseCustomTagFunction · 0.95
TestEncoderFunction · 0.95

Calls

no outgoing calls

Tested by 3

TestUseJsonTagFunction · 0.76
TestUseCustomTagFunction · 0.76
TestEncoderFunction · 0.76