diff options
author | dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> | 2020-07-02 09:11:54 +0000 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-07-02 06:40:04 -0400 |
commit | c4248e62ca8721aaed1fba241a822e201327317d (patch) | |
tree | 93a98cc4f859d4b96fd594dab22768ae3d5dcd24 /vendor/github.com/opentracing/opentracing-go/log/util.go | |
parent | e84695213e35c22ba085e3831cbd025cd55a4c84 (diff) | |
download | podman-c4248e62ca8721aaed1fba241a822e201327317d.tar.gz podman-c4248e62ca8721aaed1fba241a822e201327317d.tar.bz2 podman-c4248e62ca8721aaed1fba241a822e201327317d.zip |
Bump github.com/opentracing/opentracing-go from 1.1.0 to 1.2.0
Bumps [github.com/opentracing/opentracing-go](https://github.com/opentracing/opentracing-go) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/opentracing/opentracing-go/releases)
- [Changelog](https://github.com/opentracing/opentracing-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/opentracing/opentracing-go/compare/v1.1.0...v1.2.0)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'vendor/github.com/opentracing/opentracing-go/log/util.go')
-rw-r--r-- | vendor/github.com/opentracing/opentracing-go/log/util.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/vendor/github.com/opentracing/opentracing-go/log/util.go b/vendor/github.com/opentracing/opentracing-go/log/util.go index 3832feb5c..d57e28aa5 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 @@ 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)) } |