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

Function NewLogLineFromMap

testutil/logline.go:6–14  ·  view source on GitHub ↗

NewLogLineFromMap populates an baker.LogLine with the fields in m.

(m map[baker.FieldIndex]string, sep byte)

Source from the content-addressed store, hash-verified

4
5// NewLogLineFromMap populates an baker.LogLine with the fields in m.
6func NewLogLineFromMap(m map[baker.FieldIndex]string, sep byte) baker.Record {
7 ll := &baker.LogLine{FieldSeparator: sep}
8 for fidx, v := range m {
9 if v != "" {
10 ll.Set(fidx, []byte(v))
11 }
12 }
13 return ll
14}

Callers

nothing calls this directly

Calls 1

SetMethod · 0.95

Tested by

no test coverage detected