[VOL-4290] Voltha go library updates for gRPC migration
Change-Id: I1aa2774beb6b7ed7419bc45aeb53fcae8a8ecda0
diff --git a/vendor/github.com/opentracing/opentracing-go/log/util.go b/vendor/github.com/opentracing/opentracing-go/log/util.go
index 3832feb..d57e28a 100644
--- a/vendor/github.com/opentracing/opentracing-go/log/util.go
+++ b/vendor/github.com/opentracing/opentracing-go/log/util.go
@@ -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 @@
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))
}