mirror of
https://github.com/containers/podman.git
synced 2025-07-17 17:43:23 +08:00
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>
This commit is contained in:
![27856297+dependabot-preview[bot]@users.noreply.github.com](/assets/img/avatar_default.png)
committed by
Daniel J Walsh

parent
061c93f701
commit
f5d151a234
18
vendor/github.com/gorilla/schema/.travis.yml
generated
vendored
18
vendor/github.com/gorilla/schema/.travis.yml
generated
vendored
@ -1,18 +0,0 @@
|
||||
language: go
|
||||
sudo: false
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- go: 1.5
|
||||
- go: 1.6
|
||||
- go: 1.7
|
||||
- go: 1.8
|
||||
- go: tip
|
||||
allow_failures:
|
||||
- go: tip
|
||||
|
||||
script:
|
||||
- go get -t -v ./...
|
||||
- diff -u <(echo -n) <(gofmt -d .)
|
||||
- go vet $(go list ./... | grep -v /vendor/)
|
||||
- go test -v -race ./...
|
19
vendor/github.com/gorilla/schema/decoder.go
generated
vendored
19
vendor/github.com/gorilla/schema/decoder.go
generated
vendored
@ -152,9 +152,15 @@ type fieldWithPrefix struct {
|
||||
func isEmptyFields(fields []fieldWithPrefix, src map[string][]string) bool {
|
||||
for _, f := range fields {
|
||||
for _, path := range f.paths(f.prefix) {
|
||||
if !isEmpty(f.typ, src[path]) {
|
||||
v, ok := src[path]
|
||||
if ok && !isEmpty(f.typ, v) {
|
||||
return false
|
||||
}
|
||||
for key := range src {
|
||||
if !isEmpty(f.typ, src[key]) && strings.HasPrefix(key, path) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true
|
||||
@ -182,6 +188,17 @@ func (d *Decoder) decode(v reflect.Value, path string, parts []pathPart, values
|
||||
}
|
||||
v = v.Elem()
|
||||
}
|
||||
|
||||
// alloc embedded structs
|
||||
if v.Type().Kind() == reflect.Struct {
|
||||
for i := 0; i < v.NumField(); i++ {
|
||||
field := v.Field(i)
|
||||
if field.Type().Kind() == reflect.Ptr && field.IsNil() && v.Type().Field(i).Anonymous == true {
|
||||
field.Set(reflect.New(field.Type().Elem()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
v = v.FieldByName(name)
|
||||
}
|
||||
// Don't even bother for unexported fields.
|
||||
|
7
vendor/github.com/gorilla/schema/encoder.go
generated
vendored
7
vendor/github.com/gorilla/schema/encoder.go
generated
vendored
@ -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))
|
||||
|
Reference in New Issue
Block a user