summaryrefslogtreecommitdiff
path: root/vendor/go.opentelemetry.io/otel/semconv/internal/v4/net.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-08-26 18:05:54 +0200
committerLibravatar GitHub <noreply@github.com>2024-08-26 18:05:54 +0200
commit28d57d1f13ee61a6ff83ce4beaf238139d20bbac (patch)
tree7946abb44b21f9e2f4267146711760a911072c9b /vendor/go.opentelemetry.io/otel/semconv/internal/v4/net.go
parent[chore]: Bump github.com/prometheus/client_golang from 1.20.0 to 1.20.2 (#3239) (diff)
downloadgotosocial-28d57d1f13ee61a6ff83ce4beaf238139d20bbac.tar.xz
[chore] Bump all otel deps (#3241)
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.
}