You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
Fix gosec overflow alerts (#5799)
To allow the golangci-lint upgrade in #5796. --------- Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
+2
-1
@@ -76,7 +76,8 @@ func IntValue(v int) Value { return Int64Value(int64(v)) }
|
||||
|
||||
// Int64Value returns a [Value] for an int64.
|
||||
func Int64Value(v int64) Value {
|
||||
return Value{num: uint64(v), any: KindInt64}
|
||||
// This can be later converted back to int64 (overflow not checked).
|
||||
return Value{num: uint64(v), any: KindInt64} // nolint:gosec
|
||||
}
|
||||
|
||||
// Float64Value returns a [Value] for a float64.
|
||||
|
||||
@@ -47,6 +47,7 @@ func TestValueEqual(t *testing.T) {
|
||||
{},
|
||||
log.Int64Value(1),
|
||||
log.Int64Value(2),
|
||||
log.Int64Value(-2),
|
||||
log.Float64Value(3.5),
|
||||
log.Float64Value(3.7),
|
||||
log.BoolValue(true),
|
||||
|
||||
Reference in New Issue
Block a user