mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-25 20:58:03 +08:00
vendor: update buildkit with typed errors support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
9
vendor/github.com/opentracing/opentracing-go/log/util.go
generated
vendored
9
vendor/github.com/opentracing/opentracing-go/log/util.go
generated
vendored
@@ -1,6 +1,9 @@
|
||||
package log
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
// InterleavedKVToFields converts keyValues a la Span.LogKV() to a Field slice
|
||||
// a la Span.LogFields().
|
||||
@@ -46,6 +49,10 @@ func InterleavedKVToFields(keyValues ...interface{}) ([]Field, error) {
|
||||
case float64:
|
||||
fields[i] = Float64(key, typedVal)
|
||||
default:
|
||||
if typedVal == nil || (reflect.ValueOf(typedVal).Kind() == reflect.Ptr && reflect.ValueOf(typedVal).IsNil()) {
|
||||
fields[i] = String(key, "nil")
|
||||
continue
|
||||
}
|
||||
// When in doubt, coerce to a string
|
||||
fields[i] = String(key, fmt.Sprint(typedVal))
|
||||
}
|
||||
|
Reference in New Issue
Block a user