mirror of
https://github.com/containers/podman.git
synced 2025-06-25 03:52:15 +08:00
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
This commit is contained in:
2
go.mod
2
go.mod
@ -30,7 +30,7 @@ require (
|
||||
github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf
|
||||
github.com/google/uuid v1.1.1
|
||||
github.com/gorilla/mux v1.7.4
|
||||
github.com/gorilla/schema v1.1.0
|
||||
github.com/gorilla/schema v1.2.0
|
||||
github.com/hashicorp/go-multierror v1.1.0
|
||||
github.com/hpcloud/tail v1.0.0
|
||||
github.com/json-iterator/go v1.1.10
|
||||
|
4
go.sum
4
go.sum
@ -223,8 +223,8 @@ github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3i
|
||||
github.com/gophercloud/gophercloud v0.0.0-20190126172459-c818fa66e4c8/go.mod h1:3WdhXV3rUYy9p6AUW8d94kr+HS62Y4VL9mBnFxsD8q4=
|
||||
github.com/gorilla/mux v1.7.4 h1:VuZ8uybHlWmqV03+zRzdwKL4tUnIp1MAQtp1mIFE1bc=
|
||||
github.com/gorilla/mux v1.7.4/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
||||
github.com/gorilla/schema v1.1.0 h1:CamqUDOFUBqzrvxuz2vEwo8+SUdwsluFh7IlzJh30LY=
|
||||
github.com/gorilla/schema v1.1.0/go.mod h1:kgLaKoK1FELgZqMAVxx/5cbj0kT+57qxUrAlIO2eleU=
|
||||
github.com/gorilla/schema v1.2.0 h1:YufUaxZYCKGFuAq3c96BOhjgd5nmXiOY9NGzF247Tsc=
|
||||
github.com/gorilla/schema v1.2.0/go.mod h1:kgLaKoK1FELgZqMAVxx/5cbj0kT+57qxUrAlIO2eleU=
|
||||
github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
|
||||
github.com/gregjones/httpcache v0.0.0-20170728041850-787624de3eb7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
|
||||
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
|
||||
|
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))
|
||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -307,7 +307,7 @@ github.com/google/shlex
|
||||
github.com/google/uuid
|
||||
# github.com/gorilla/mux v1.7.4
|
||||
github.com/gorilla/mux
|
||||
# github.com/gorilla/schema v1.1.0
|
||||
# github.com/gorilla/schema v1.2.0
|
||||
github.com/gorilla/schema
|
||||
# github.com/hashicorp/errwrap v1.0.0
|
||||
github.com/hashicorp/errwrap
|
||||
|
Reference in New Issue
Block a user