Replace list.List with Go slices (#1950)

* Add .vscode to .gitignore

* Replace `list.List` with slices
This commit is contained in:
John Kerl 2026-02-01 17:22:28 -05:00 committed by GitHub
parent 0f7f415974
commit 7da6f1453d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
94 changed files with 767 additions and 918 deletions

View file

@ -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)
}
}