You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-11-27 22:49:15 +02:00
change key to a string alias and KeyValue constructors (#217)
* change key to a string alias and KeyValue constructors * fix int and uint tests
This commit is contained in:
committed by
rghetia
parent
75562dd381
commit
5e409de1aa
@@ -5,9 +5,7 @@ import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type Key struct {
|
||||
Name string
|
||||
}
|
||||
type Key string
|
||||
|
||||
type KeyValue struct {
|
||||
Key Key
|
||||
@@ -147,7 +145,7 @@ func (k Key) Uint(v uint) KeyValue {
|
||||
}
|
||||
|
||||
func (k Key) Defined() bool {
|
||||
return len(k.Name) != 0
|
||||
return len(k) != 0
|
||||
}
|
||||
|
||||
// TODO make this a lazy one-time conversion.
|
||||
|
||||
Reference in New Issue
Block a user