MCPcopy
hub / github.com/vmihailenco/msgpack / EncodeBool

Method EncodeBool

encode.go:247–252  ·  view source on GitHub ↗
(value bool)

Source from the content-addressed store, hash-verified

245}
246
247func (e *Encoder) EncodeBool(value bool) error {
248 if value {
249 return e.writeCode(msgpcode.True)
250 }
251 return e.writeCode(msgpcode.False)
252}
253
254func (e *Encoder) EncodeDuration(d time.Duration) error {
255 return e.EncodeInt(int64(d))

Callers 4

EncodeMethod · 0.95
encodeBoolValueFunction · 0.80
encodeMapStringBoolValueFunction · 0.80

Calls 1

writeCodeMethod · 0.95

Tested by

no test coverage detected