NewLogLineFromMap populates an baker.LogLine with the fields in m.
(m map[baker.FieldIndex]string, sep byte)
| 4 | |
| 5 | // NewLogLineFromMap populates an baker.LogLine with the fields in m. |
| 6 | func 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 | } |