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

Method Get

logline.go:77–91  ·  view source on GitHub ↗

Get the value of a field (either standard or custom).

(f FieldIndex)

Source from the content-addressed store, hash-verified

75
76// Get the value of a field (either standard or custom).
77func (l *LogLine) Get(f FieldIndex) []byte {
78 if idx := l.wmask[f]; idx != 0 {
79 return l.wdata[idx]
80 }
81 if f >= LogLineNumFields {
82 return nil
83 }
84
85 s := l.idx[f] + 1
86 e := l.idx[f+1]
87 if e-s < 1 {
88 return nil
89 }
90 return l.data[s:e]
91}
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) {

Callers 14

benchmarkTopologyFunction · 0.95
ToTextMethod · 0.95
CopyMethod · 0.95
TestLogLineParseFunction · 0.95
TestLogLineCustomFieldsFunction · 0.95
TestLogLineGetFunction · 0.95
TestReplaceFieldsFunction · 0.95
TestCryptFunction · 0.95
TestSetStringFromURLFunction · 0.95
TestTimestampFunction · 0.95
TestClearFieldsFilterFunction · 0.95

Calls

no outgoing calls

Tested by 12

benchmarkTopologyFunction · 0.76
TestLogLineParseFunction · 0.76
TestLogLineCustomFieldsFunction · 0.76
TestLogLineGetFunction · 0.76
TestReplaceFieldsFunction · 0.76
TestCryptFunction · 0.76
TestSetStringFromURLFunction · 0.76
TestTimestampFunction · 0.76
TestClearFieldsFilterFunction · 0.76
TestConcatenateFilterFunction · 0.76
TestSliceFunction · 0.76