diff options
author | Matthew Heon <mheon@redhat.com> | 2021-04-16 11:06:33 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-04-16 11:07:33 -0400 |
commit | 2816c55f3a7138a04837694afa8bf0a515fe00ac (patch) | |
tree | 2211afa8bf7ca66b96626ebb1e5578327d0e3a3d /vendor/github.com/go-task/slim-sprig/reflect.go | |
parent | bd94d84fadda7000da78e36d9865949dc8e7adb4 (diff) | |
download | podman-2816c55f3a7138a04837694afa8bf0a515fe00ac.tar.gz podman-2816c55f3a7138a04837694afa8bf0a515fe00ac.tar.bz2 podman-2816c55f3a7138a04837694afa8bf0a515fe00ac.zip |
Update all containers/ project vendors
Bumps:
- c/storage to v1.29.0
- c/image to v5.11.0
- c/common to v0.36.0
- Buildah to v1.20.1
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'vendor/github.com/go-task/slim-sprig/reflect.go')
-rw-r--r-- | vendor/github.com/go-task/slim-sprig/reflect.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/vendor/github.com/go-task/slim-sprig/reflect.go b/vendor/github.com/go-task/slim-sprig/reflect.go new file mode 100644 index 000000000..8a65c132f --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/reflect.go @@ -0,0 +1,28 @@ +package sprig + +import ( + "fmt" + "reflect" +) + +// typeIs returns true if the src is the type named in target. +func typeIs(target string, src interface{}) bool { + return target == typeOf(src) +} + +func typeIsLike(target string, src interface{}) bool { + t := typeOf(src) + return target == t || "*"+target == t +} + +func typeOf(src interface{}) string { + return fmt.Sprintf("%T", src) +} + +func kindIs(target string, src interface{}) bool { + return target == kindOf(src) +} + +func kindOf(src interface{}) string { + return reflect.ValueOf(src).Kind().String() +} |