diff options
author | dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> | 2020-08-24 08:16:44 +0000 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-08-28 05:56:49 -0400 |
commit | f5d151a2341245bd22f6a64c744eadd61e01539d (patch) | |
tree | 5c39cf4444016345eb50365ab57dd658e052ecf0 /vendor/github.com/gorilla/schema/encoder.go | |
parent | 061c93f70101026d79cca6e75ac0c565e1fa99ec (diff) | |
download | podman-f5d151a2341245bd22f6a64c744eadd61e01539d.tar.gz podman-f5d151a2341245bd22f6a64c744eadd61e01539d.tar.bz2 podman-f5d151a2341245bd22f6a64c744eadd61e01539d.zip |
Bump github.com/gorilla/schema from 1.1.0 to 1.2.0
Bumps [github.com/gorilla/schema](https://github.com/gorilla/schema) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/gorilla/schema/releases)
- [Commits](https://github.com/gorilla/schema/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/gorilla/schema/encoder.go')
-rw-r--r-- | vendor/github.com/gorilla/schema/encoder.go | 7 |
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)) |