mirror of
https://github.com/containers/podman.git
synced 2025-11-30 18:18:18 +08:00
Update module github.com/gorilla/schema to v1.3.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
16
vendor/github.com/gorilla/schema/cache.go
generated
vendored
16
vendor/github.com/gorilla/schema/cache.go
generated
vendored
@@ -197,6 +197,7 @@ func (c *cache) createField(field reflect.StructField, parentAlias string) *fiel
|
||||
isSliceOfStructs: isSlice && isStruct,
|
||||
isAnonymous: field.Anonymous,
|
||||
isRequired: options.Contains("required"),
|
||||
defaultValue: options.getDefaultOptionValue(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,8 +247,9 @@ type fieldInfo struct {
|
||||
// isSliceOfStructs indicates if the field type is a slice of structs.
|
||||
isSliceOfStructs bool
|
||||
// isAnonymous indicates whether the field is embedded in the struct.
|
||||
isAnonymous bool
|
||||
isRequired bool
|
||||
isAnonymous bool
|
||||
isRequired bool
|
||||
defaultValue string
|
||||
}
|
||||
|
||||
func (f *fieldInfo) paths(prefix string) []string {
|
||||
@@ -303,3 +305,13 @@ func (o tagOptions) Contains(option string) bool {
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (o tagOptions) getDefaultOptionValue() string {
|
||||
for _, s := range o {
|
||||
if strings.HasPrefix(s, "default:") {
|
||||
return strings.Split(s, ":")[1]
|
||||
}
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user