summaryrefslogtreecommitdiff
path: root/vendor/go.opentelemetry.io/otel/semconv/internal
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/go.opentelemetry.io/otel/semconv/internal')
-rw-r--r--vendor/go.opentelemetry.io/otel/semconv/internal/http.go2
-rw-r--r--vendor/go.opentelemetry.io/otel/semconv/internal/v4/net.go6
2 files changed, 4 insertions, 4 deletions
diff --git a/vendor/go.opentelemetry.io/otel/semconv/internal/http.go b/vendor/go.opentelemetry.io/otel/semconv/internal/http.go
index ada857995..d5197e16c 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/internal/http.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/internal/http.go
@@ -115,7 +115,7 @@ func hostIPNamePort(hostWithPort string) (ip string, name string, port int) {
name = hostPart
}
if parsedPort, err = strconv.ParseUint(portPart, 10, 16); err == nil {
- port = int(parsedPort)
+ port = int(parsedPort) // nolint: gosec // Bit size of 16 checked above.
}
return
}
diff --git a/vendor/go.opentelemetry.io/otel/semconv/internal/v4/net.go b/vendor/go.opentelemetry.io/otel/semconv/internal/v4/net.go
index 65db0cb61..f240b9af0 100644
--- a/vendor/go.opentelemetry.io/otel/semconv/internal/v4/net.go
+++ b/vendor/go.opentelemetry.io/otel/semconv/internal/v4/net.go
@@ -61,7 +61,7 @@ func (c *NetConv) Host(address string) []attribute.KeyValue {
attrs := make([]attribute.KeyValue, 0, n)
attrs = append(attrs, c.HostName(h))
if p > 0 {
- attrs = append(attrs, c.HostPort(int(p)))
+ attrs = append(attrs, c.HostPort(p))
}
return attrs
}
@@ -252,7 +252,7 @@ func (c *NetConv) Peer(address string) []attribute.KeyValue {
attrs := make([]attribute.KeyValue, 0, n)
attrs = append(attrs, c.PeerName(h))
if p > 0 {
- attrs = append(attrs, c.PeerPort(int(p)))
+ attrs = append(attrs, c.PeerPort(p))
}
return attrs
}
@@ -309,5 +309,5 @@ func splitHostPort(hostport string) (host string, port int) {
if err != nil {
return
}
- return host, int(p)
+ return host, int(p) // nolint: gosec // Bit size of 16 checked above.
}