MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / Set

Method Set

projects/Go/proto/fbe/FieldModelBool.go:58–65  ·  view source on GitHub ↗

Set the value

(value bool)

Source from the content-addressed store, hash-verified

56
57// Set the value
58func (fm *FieldModelBool) Set(value bool) error {
59 if (fm.buffer.Offset() + fm.FBEOffset() + fm.FBESize()) > fm.buffer.Size() {
60 return errors.New("model is broken")
61 }
62
63 WriteBool(fm.buffer.Data(), fm.buffer.Offset() + fm.FBEOffset(), value)
64 return nil
65}

Callers 2

TestCreateFunction · 0.45
mainFunction · 0.45

Calls 6

FBEOffsetMethod · 0.95
FBESizeMethod · 0.95
WriteBoolFunction · 0.85
DataMethod · 0.80
OffsetMethod · 0.45
SizeMethod · 0.45

Tested by 1

TestCreateFunction · 0.36