summaryrefslogtreecommitdiff
path: root/vendor/go.opentelemetry.io/otel/semconv/internal/v4/net.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/go.opentelemetry.io/otel/semconv/internal/v4/net.go')
-rw-r--r--vendor/go.opentelemetry.io/otel/semconv/internal/v4/net.go6
1 files changed, 3 insertions, 3 deletions
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.
}