1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-11-29 23:07:45 +02:00

[chore]: enable int-conversion rule of perfsprint (#5964)

[perfsprint](https://github.com/catenacyber/perfsprint) is a linter for
performance, aiming at usages of fmt.Sprintf which have faster
alternatives.

This PR enables int-conversion rule

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2024-11-14 19:17:37 +01:00
committed by GitHub
parent 0678ffac68
commit 61e9b35139
6 changed files with 20 additions and 7 deletions

View File

@@ -9,6 +9,7 @@ package internaltest // import "go.opentelemetry.io/otel/sdk/internal/internalte
import (
"context"
"fmt"
"strconv"
"sync"
"testing"
"time"
@@ -58,7 +59,7 @@ func (h *Harness) TestTracerProvider(subjectFactory func() trace.TracerProvider)
go func(name, version string) {
_ = tp.Tracer(name, trace.WithInstrumentationVersion(version))
wg.Done()
}(fmt.Sprintf("tracer %d", i%5), fmt.Sprintf("%d", i))
}(fmt.Sprintf("tracer %d", i%5), strconv.Itoa(i))
}
wg.Wait()
done <- struct{}{}