1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-26 21:05:00 +02:00

log: Add missing notice to Bytes, Slice, Map doc comment (#5598)

Add comment which is already in `BytesValue`, `SliceValue`, `MapValue`.

Maybe it would help mitigating issues like
https://github.com/open-telemetry/opentelemetry-go-contrib/issues/5879.
This commit is contained in:
Robert Pająk 2024-07-11 06:39:08 +02:00 committed by GitHub
parent e8c22e6e71
commit 1384c27ad0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -351,16 +351,19 @@ func Bool(key string, value bool) KeyValue {
}
// Bytes returns a KeyValue for a []byte value.
// The passed slice must not be changed after it is passed.
func Bytes(key string, value []byte) KeyValue {
return KeyValue{key, BytesValue(value)}
}
// Slice returns a KeyValue for a []Value value.
// The passed slice must not be changed after it is passed.
func Slice(key string, value ...Value) KeyValue {
return KeyValue{key, SliceValue(value...)}
}
// Map returns a KeyValue for a map value.
// The passed slice must not be changed after it is passed.
func Map(key string, value ...KeyValue) KeyValue {
return KeyValue{key, MapValue(value...)}
}