mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-17 16:38:54 +00:00
Replace list.List with Go slices (#1950)
* Add .vscode to .gitignore * Replace `list.List` with slices
This commit is contained in:
parent
0f7f415974
commit
7da6f1453d
94 changed files with 767 additions and 918 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package transformers
|
||||
|
||||
import (
|
||||
"container/list"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
|
@ -166,7 +165,7 @@ func NewTransformerTee(
|
|||
|
||||
func (tr *TransformerTee) Transform(
|
||||
inrecAndContext *types.RecordAndContext,
|
||||
outputRecordsAndContexts *list.List, // list of *types.RecordAndContext
|
||||
outputRecordsAndContexts *[]*types.RecordAndContext, // list of *types.RecordAndContext
|
||||
inputDownstreamDoneChannel <-chan bool,
|
||||
outputDownstreamDoneChannel chan<- bool,
|
||||
) {
|
||||
|
|
@ -202,7 +201,7 @@ func (tr *TransformerTee) Transform(
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
outputRecordsAndContexts.PushBack(inrecAndContext)
|
||||
*outputRecordsAndContexts = append(*outputRecordsAndContexts, inrecAndContext)
|
||||
} else {
|
||||
err := tr.fileOutputHandler.Close()
|
||||
if err != nil {
|
||||
|
|
@ -214,6 +213,6 @@ func (tr *TransformerTee) Transform(
|
|||
fmt.Fprintln(os.Stderr, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
outputRecordsAndContexts.PushBack(inrecAndContext)
|
||||
*outputRecordsAndContexts = append(*outputRecordsAndContexts, inrecAndContext)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue