MCPcopy Create free account
hub / github.com/cloudwego/dynamicgo / EncodeBool

Method EncodeBool

thrift/binary.go:2101–2107  ·  view source on GitHub ↗

EncodeBool encodes a bool value.

(b []byte, v bool)

Source from the content-addressed store, hash-verified

2099
2100// EncodeBool encodes a bool value.
2101func (BinaryEncoding) EncodeBool(b []byte, v bool) {
2102 if v {
2103 b[0] = 1
2104 } else {
2105 b[0] = 0
2106 }
2107}
2108
2109// EncodeByte encodes a byte value.
2110func (BinaryEncoding) EncodeByte(b []byte, v byte) {

Callers 2

EncodeEmptyMethod · 0.95
NewNodeBoolFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected