1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00
Use
https://pkg.go.dev/golang.org/x/tools/gopls/internal/analysis/modernize
to update code to new style.

---------

Co-authored-by: Flc゛ <four_leaf_clover@foxmail.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
This commit is contained in:
Mikhail Mazurskiy
2025-07-29 18:19:11 +10:00
committed by GitHub
parent 7bcbb6a49a
commit 5e1c62a2d5
97 changed files with 234 additions and 268 deletions
@@ -107,7 +107,7 @@ func testClientStopManyTimes(t *testing.T, client otlptrace.Client) {
const num int = 20
wg.Add(num)
errs := make([]error, num)
for i := 0; i < num; i++ {
for i := range num {
go func(idx int) {
defer wg.Done()
<-ch
@@ -48,7 +48,7 @@ func RunEndToEndTest(ctx context.Context, t *testing.T, exp *otlptrace.Exporter,
tr2 := tp2.Tracer("test-tracer2")
// Now create few spans
m := 4
for i := 0; i < m; i++ {
for i := range m {
_, span := tr1.Start(ctx, "AlwaysSample")
span.SetAttributes(attribute.Int64("i", int64(i)))
span.End()
@@ -109,7 +109,7 @@ func RunEndToEndTest(ctx context.Context, t *testing.T, exp *otlptrace.Exporter,
if got, want := len(attrMap), m; got != want {
t.Fatalf("span attribute unique values: got %d want %d", got, want)
}
for i := 0; i < m; i++ {
for i := range m {
_, ok := attrMap[int64(i)]
if !ok {
t.Fatalf("span with attribute %d missing", i)