|
|
@ -153,9 +153,11 @@ func doParseKeyAndOptions(field reflect.StructField, value string) (string, *fie
|
|
|
|
key := strings.TrimSpace(segments[0])
|
|
|
|
key := strings.TrimSpace(segments[0])
|
|
|
|
options := segments[1:]
|
|
|
|
options := segments[1:]
|
|
|
|
|
|
|
|
|
|
|
|
if len(options) > 0 {
|
|
|
|
if len(options) == 0 {
|
|
|
|
var fieldOpts fieldOptions
|
|
|
|
return key, nil, nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var fieldOpts fieldOptions
|
|
|
|
for _, segment := range options {
|
|
|
|
for _, segment := range options {
|
|
|
|
option := strings.TrimSpace(segment)
|
|
|
|
option := strings.TrimSpace(segment)
|
|
|
|
switch {
|
|
|
|
switch {
|
|
|
@ -204,9 +206,6 @@ func doParseKeyAndOptions(field reflect.StructField, value string) (string, *fie
|
|
|
|
return key, &fieldOpts, nil
|
|
|
|
return key, &fieldOpts, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return key, nil, nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func implicitValueRequiredStruct(tag string, tp reflect.Type) (bool, error) {
|
|
|
|
func implicitValueRequiredStruct(tag string, tp reflect.Type) (bool, error) {
|
|
|
|
numFields := tp.NumField()
|
|
|
|
numFields := tp.NumField()
|
|
|
|
for i := 0; i < numFields; i++ {
|
|
|
|
for i := 0; i < numFields; i++ {
|
|
|
|