summaryrefslogtreecommitdiff
path: root/vendor/github.com/docker/distribution/context/util.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2019-01-08 14:52:57 +0100
committerValentin Rothberg <rothberg@redhat.com>2019-01-11 13:38:11 +0100
commitbd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87 (patch)
tree5f06e4e289f16d9164d692590a3fe6541b5384cf /vendor/github.com/docker/distribution/context/util.go
parent545f24421247c9f6251a634764db3f8f8070a812 (diff)
downloadpodman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.tar.gz
podman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.tar.bz2
podman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.zip
vendor: update everything
* If possible, update each dependency to the latest available version. * Use releases over commit IDs and avoid vendoring branches. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/docker/distribution/context/util.go')
-rw-r--r--vendor/github.com/docker/distribution/context/util.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/vendor/github.com/docker/distribution/context/util.go b/vendor/github.com/docker/distribution/context/util.go
deleted file mode 100644
index cb9ef52e3..000000000
--- a/vendor/github.com/docker/distribution/context/util.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package context
-
-import (
- "time"
-)
-
-// Since looks up key, which should be a time.Time, and returns the duration
-// since that time. If the key is not found, the value returned will be zero.
-// This is helpful when inferring metrics related to context execution times.
-func Since(ctx Context, key interface{}) time.Duration {
- if startedAt, ok := ctx.Value(key).(time.Time); ok {
- return time.Since(startedAt)
- }
- return 0
-}
-
-// GetStringValue returns a string value from the context. The empty string
-// will be returned if not found.
-func GetStringValue(ctx Context, key interface{}) (value string) {
- if valuev, ok := ctx.Value(key).(string); ok {
- value = valuev
- }
- return value
-}