summaryrefslogtreecommitdiff
path: root/vendor/github.com/gorilla/schema/encoder.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-28 08:27:00 -0400
committerGitHub <noreply@github.com>2020-08-28 08:27:00 -0400
commitad80e9a10a06a5d3b5a8ff6b286232d4c93ee2ea (patch)
tree1358b41af41fab4f7534297e33b97a2fc9ef8860 /vendor/github.com/gorilla/schema/encoder.go
parent74bdf52c401dd1c9cd3c636d4fa8ea94e7c88ef3 (diff)
parentf5d151a2341245bd22f6a64c744eadd61e01539d (diff)
downloadpodman-ad80e9a10a06a5d3b5a8ff6b286232d4c93ee2ea.tar.gz
podman-ad80e9a10a06a5d3b5a8ff6b286232d4c93ee2ea.tar.bz2
podman-ad80e9a10a06a5d3b5a8ff6b286232d4c93ee2ea.zip
Merge pull request #7421 from containers/dependabot/go_modules/github.com/gorilla/schema-1.2.0
Bump github.com/gorilla/schema from 1.1.0 to 1.2.0
Diffstat (limited to 'vendor/github.com/gorilla/schema/encoder.go')
-rw-r--r--vendor/github.com/gorilla/schema/encoder.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/vendor/github.com/gorilla/schema/encoder.go b/vendor/github.com/gorilla/schema/encoder.go
index bf1d511e6..f0ed63121 100644
--- a/vendor/github.com/gorilla/schema/encoder.go
+++ b/vendor/github.com/gorilla/schema/encoder.go
@@ -57,6 +57,13 @@ func isZero(v reflect.Value) bool {
}
return z
case reflect.Struct:
+ type zero interface {
+ IsZero() bool
+ }
+ if v.Type().Implements(reflect.TypeOf((*zero)(nil)).Elem()) {
+ iz := v.MethodByName("IsZero").Call([]reflect.Value{})[0]
+ return iz.Interface().(bool)
+ }
z := true
for i := 0; i < v.NumField(); i++ {
z = z && isZero(v.Field(i))