Skip to content

Commit dfb5d9d

Browse files
committed
style: Lint
1 parent ecc119a commit dfb5d9d

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

schema/table.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,7 @@ func (tt Tables) UnflattenTables() (Tables, error) {
482482
}
483483

484484
func (tt Tables) TableNames() []string {
485+
//nolint:prealloc
485486
ret := []string{}
486487
for _, t := range tt {
487488
ret = append(ret, t.TableNames()...)
@@ -742,6 +743,7 @@ func (t *Table) PrimaryKeyComponents() []string {
742743
}
743744

744745
func (t *Table) TableNames() []string {
746+
//nolint:prealloc
745747
ret := []string{t.Name}
746748
for _, rel := range t.Relations {
747749
ret = append(ret, rel.TableNames()...)

serve/package.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,7 @@ func (s *PluginServe) build(pluginDirectory string, target plugin.BuildTarget, d
130130
stripSymbols = ""
131131
}
132132
ldFlags := fmt.Sprintf("%[1]s -w -X %[2]s/plugin.Version=%[3]s -X %[2]s/resources/plugin.Version=%[3]s", stripSymbols, importPath, pluginVersion)
133-
args := []string{"build", "-o", pluginPath}
134-
args = append(args, "-buildmode=exe")
135-
args = append(args, "-ldflags", ldFlags)
133+
args := []string{"build", "-o", pluginPath, "-buildmode=exe", "-ldflags", ldFlags}
136134
cmd := exec.Command("go", args...)
137135
cmd.Dir = pluginDirectory
138136
cmd.Stdout = os.Stdout

writers/writers_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ func BenchmarkWriterMemory(b *testing.B) {
4040
"bytes100M": {streamingbatchwriter.WithBatchSizeBytes(100000000)},
4141
}
4242

43+
//nolint:prealloc
4344
var bCases []bCase
4445
bCases = append(bCases, writerMatrix("BatchWriter", batchwriter.New, newBatchWriterClient(), makeRecord, batchwriterOpts)...)
4546
bCases = append(bCases, writerMatrix("BatchWriter wide", batchwriter.New, newBatchWriterClient(), makeWideRecord, batchwriterOpts)...)

0 commit comments

Comments
 (0)