func NewLTSVScanner(keys []string, r io.Reader) *LTSVScanner { return <SVScanner{ OutputDelimiter: "\t", keys: keys, reader: goltsv.NewReader(r), } }
func (v *LTSView) Start() { reader := goltsv.NewReader(v.Reader) for { record, err := reader.Read() if err == io.EOF { break } if err != nil { continue } PrintSep(v.Writer) sortedKeys := SortKeys(record) for _, k := range sortedKeys { if _, ignore := v.Ikeys[k]; len(v.Ikeys) > 0 && ignore { continue } if _, show := v.Keys[k]; len(v.Keys) > 0 && !show { continue } PrintLine(v.Writer, k, record[k]) } } }