Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions o11y/otel/otel.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ func newHTTP(ctx context.Context, opt httpOpts) (*otlptrace.Exporter, error) {
headers := map[string]string{
"User-Agent": ua,
}
opts := []otlptracehttp.Option{otlptracehttp.WithEndpointURL(opt.endpoint)}
opts := make([]otlptracehttp.Option, 0, 2)
opts = append(opts, otlptracehttp.WithEndpointURL(opt.endpoint))
if opt.token != "" {
headers["Authorization"] = fmt.Sprintf("Bearer %s", opt.token.Raw())
}
Expand Down Expand Up @@ -237,7 +238,7 @@ func toOtelOpts(opts []o11y.SpanOpt) []trace.SpanStartOption {
if cfg.Kind == 0 {
cfg.Kind = o11y.SpanKindInternal
}
var so []trace.SpanStartOption
so := make([]trace.SpanStartOption, 0, 1)
so = append(so, trace.WithSpanKind(trace.SpanKind(cfg.Kind)))
return so
}
Expand Down
2 changes: 1 addition & 1 deletion o11y/otel/otel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ func TestGolden(t *testing.T) {
// We should have two normal traces and one golden trace
assert.Assert(t, cmp.Len(traces, 3))

var spans []jaeger.Span
spans := make([]jaeger.Span, 0, 9)
for _, trc := range traces {
spans = append(spans, trc.Spans...)
}
Expand Down
5 changes: 3 additions & 2 deletions releases/compiler/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,15 @@ func (c *compiler) Compile(ctx context.Context, work Work) (string, error) {
// #nosec - this is fine
cmd = exec.CommandContext(ctx, goBin, args...)
} else {
args := []string{
args := make([]string, 0, 9)
args = append(args,
"test",
"-coverpkg=./...",
"-c",
work.Source,
"-o", path,
"-tags", "testrunmain",
}
)
if work.Tags != "" {
args[len(args)-1] += " " + work.Tags
}
Expand Down
5 changes: 3 additions & 2 deletions releases/release/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,14 @@ func (f *fixture) download(ctx context.Context, requirements ...func(*httpclient
}
var errorResp errorMessage

options := []func(*httpclient.Request){
options := make([]func(*httpclient.Request), 0, 5+len(requirements))
options = append(options,
httpclient.JSONDecoder(&resp),
httpclient.Decoder(http.StatusBadRequest, httpclient.NewJSONDecoder(&errorResp)),
httpclient.Decoder(http.StatusNotFound, httpclient.NewJSONDecoder(&errorResp)),
httpclient.Decoder(http.StatusGone, httpclient.NewJSONDecoder(&errorResp)),
httpclient.NoRetry(),
}
)
options = append(options, requirements...)

err := f.Client.Call(ctx, httpclient.NewRequest("GET", "/downloads", options...))
Expand Down
35 changes: 18 additions & 17 deletions tools/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.24.0
toolchain go1.25.5

require (
github.com/golangci/golangci-lint/v2 v2.7.2
github.com/golangci/golangci-lint/v2 v2.8.0
github.com/gwatts/rootcerts v0.0.0-20251201182650-439605fc1b85
github.com/rinchsan/gosimports v0.3.8
gotest.tools/gotestsum v1.13.0
Expand All @@ -15,6 +15,7 @@ require (
4d63.com/gocheckcompilerdirectives v1.3.0 // indirect
4d63.com/gochecknoglobals v0.2.2 // indirect
codeberg.org/chavacava/garif v0.2.0 // indirect
codeberg.org/polyfloyd/go-errorlint v1.9.0 // indirect
dev.gaijin.team/go/exhaustruct/v4 v4.0.0 // indirect
dev.gaijin.team/go/golib v0.6.0 // indirect
github.com/4meepo/tagalign v1.4.3 // indirect
Expand All @@ -24,15 +25,15 @@ require (
github.com/Antonboom/errname v1.1.1 // indirect
github.com/Antonboom/nilnil v1.1.1 // indirect
github.com/Antonboom/testifylint v1.6.4 // indirect
github.com/BurntSushi/toml v1.5.0 // indirect
github.com/BurntSushi/toml v1.6.0 // indirect
github.com/Djarvur/go-err113 v0.1.1 // indirect
github.com/Masterminds/semver/v3 v3.4.0 // indirect
github.com/MirrexOne/unqueryvet v1.3.0 // indirect
github.com/MirrexOne/unqueryvet v1.4.0 // indirect
github.com/OpenPeeDeeP/depguard/v2 v2.2.1 // indirect
github.com/alecthomas/chroma/v2 v2.20.0 // indirect
github.com/alecthomas/chroma/v2 v2.21.1 // indirect
github.com/alecthomas/go-check-sumtype v0.3.1 // indirect
github.com/alexkohler/nakedret/v2 v2.0.6 // indirect
github.com/alexkohler/prealloc v1.0.0 // indirect
github.com/alexkohler/prealloc v1.0.1 // indirect
github.com/alfatraining/structtag v1.0.0 // indirect
github.com/alingse/asasalint v0.0.11 // indirect
github.com/alingse/nilnesserr v0.2.0 // indirect
Expand Down Expand Up @@ -72,8 +73,8 @@ require (
github.com/firefart/nonamedreturns v1.0.6 // indirect
github.com/fsnotify/fsnotify v1.9.0 // indirect
github.com/fzipp/gocyclo v0.6.0 // indirect
github.com/ghostiam/protogetter v0.3.17 // indirect
github.com/go-critic/go-critic v0.14.2 // indirect
github.com/ghostiam/protogetter v0.3.18 // indirect
github.com/go-critic/go-critic v0.14.3 // indirect
github.com/go-toolsmith/astcast v1.1.0 // indirect
github.com/go-toolsmith/astcopy v1.1.0 // indirect
github.com/go-toolsmith/astequal v1.2.0 // indirect
Expand All @@ -84,14 +85,14 @@ require (
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/go-xmlfmt/xmlfmt v1.1.3 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/godoc-lint/godoc-lint v0.10.2 // indirect
github.com/godoc-lint/godoc-lint v0.11.1 // indirect
github.com/gofrs/flock v0.13.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golangci/asciicheck v0.5.0 // indirect
github.com/golangci/dupl v0.0.0-20250308024227-f665c8d69b32 // indirect
github.com/golangci/go-printf-func-name v0.1.1 // indirect
github.com/golangci/gofmt v0.0.0-20250106114630-d62b90e6713d // indirect
github.com/golangci/golines v0.0.0-20250217134842-442fd0091d95 // indirect
github.com/golangci/golines v0.14.0 // indirect
github.com/golangci/misspell v0.7.0 // indirect
github.com/golangci/plugin-module-register v0.1.2 // indirect
github.com/golangci/revgrep v0.8.0 // indirect
Expand Down Expand Up @@ -121,8 +122,9 @@ require (
github.com/kunwardeep/paralleltest v1.0.15 // indirect
github.com/lasiar/canonicalheader v1.1.2 // indirect
github.com/ldez/exptostd v0.4.5 // indirect
github.com/ldez/gomoddirectives v0.7.1 // indirect
github.com/ldez/gomoddirectives v0.8.0 // indirect
github.com/ldez/grignotin v0.10.1 // indirect
github.com/ldez/structtags v0.6.1 // indirect
github.com/ldez/tagliatelle v0.7.2 // indirect
github.com/ldez/usetesting v0.5.0 // indirect
github.com/leonklingele/grouper v1.1.2 // indirect
Expand Down Expand Up @@ -150,7 +152,6 @@ require (
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/polyfloyd/go-errorlint v1.8.0 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
Expand All @@ -169,7 +170,7 @@ require (
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
github.com/sashamelentyev/usestdlibvars v1.29.0 // indirect
github.com/securego/gosec/v2 v2.22.11-0.20251204091113-daccba6b93d7 // indirect
github.com/securego/gosec/v2 v2.22.11 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/sivchari/containedctx v1.0.3 // indirect
github.com/sonatard/noctx v0.4.0 // indirect
Expand Down Expand Up @@ -209,12 +210,12 @@ require (
go.uber.org/zap v1.27.0 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/exp/typeparams v0.0.0-20251023183803-a4bb9ffd2546 // indirect
golang.org/x/mod v0.30.0 // indirect
golang.org/x/sync v0.18.0 // indirect
golang.org/x/sys v0.38.0 // indirect
golang.org/x/term v0.35.0 // indirect
golang.org/x/mod v0.31.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.39.0 // indirect
golang.org/x/term v0.38.0 // indirect
golang.org/x/text v0.31.0 // indirect
golang.org/x/tools v0.39.0 // indirect
golang.org/x/tools v0.40.0 // indirect
google.golang.org/protobuf v1.36.8 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
Loading