MCPcopy Create free account
hub / github.com/AdRoll/baker / Set

Method Set

logline.go:94–105  ·  view source on GitHub ↗

Set changes the value of a field (either standard or custom) to a new value.

(f FieldIndex, data []byte)

Source from the content-addressed store, hash-verified

92
93// Set changes the value of a field (either standard or custom) to a new value.
94func (l *LogLine) Set(f FieldIndex, data []byte) {
95 if l.wmask[f] != 0 {
96 l.wdata[l.wmask[f]] = data
97 return
98 }
99 l.wcnt++
100 if l.wcnt == 0 {
101 panic("too many fields changed")
102 }
103 l.wmask[f] = l.wcnt
104 l.wdata[l.wcnt] = data
105}
106
107var errLogLineTooManyFields = errors.New("LogLine has too many fields")
108

Callers 15

benchmarkTopologyFunction · 0.95
BenchmarkLogLineCopyFunction · 0.95
CopyMethod · 0.95
TestLogLineToTextFunction · 0.95
TestLogLineCustomFieldsFunction · 0.95
TestLogLineGetFunction · 0.95
TestLogLineSetPanicFunction · 0.95
TestLogLineCopyFunction · 0.95

Calls

no outgoing calls

Tested by 15

benchmarkTopologyFunction · 0.76
BenchmarkLogLineCopyFunction · 0.76
TestLogLineToTextFunction · 0.76
TestLogLineCustomFieldsFunction · 0.76
TestLogLineGetFunction · 0.76
TestLogLineSetPanicFunction · 0.76
TestLogLineCopyFunction · 0.76
TestRawOutputFieldsFunction · 0.76