mirror of
https://github.com/restic/restic.git
synced 2025-12-08 06:09:56 +00:00
Upadte vendored dependencies
This commit is contained in:
parent
315b7f282f
commit
8d37b723ca
380 changed files with 136541 additions and 78532 deletions
14
vendor/github.com/go-ini/ini/struct.go
generated
vendored
14
vendor/github.com/go-ini/ini/struct.go
generated
vendored
|
|
@ -113,7 +113,7 @@ func setSliceWithProperType(key *Key, field reflect.Value, delim string, allowSh
|
|||
default:
|
||||
return fmt.Errorf("unsupported type '[]%s'", sliceOf)
|
||||
}
|
||||
if isStrict {
|
||||
if err != nil && isStrict {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
@ -450,6 +450,12 @@ func (s *Section) reflectFrom(val reflect.Value) error {
|
|||
// Note: fieldName can never be empty here, ignore error.
|
||||
sec, _ = s.f.NewSection(fieldName)
|
||||
}
|
||||
|
||||
// Add comment from comment tag
|
||||
if len(sec.Comment) == 0 {
|
||||
sec.Comment = tpField.Tag.Get("comment")
|
||||
}
|
||||
|
||||
if err = sec.reflectFrom(field); err != nil {
|
||||
return fmt.Errorf("error reflecting field (%s): %v", fieldName, err)
|
||||
}
|
||||
|
|
@ -461,6 +467,12 @@ func (s *Section) reflectFrom(val reflect.Value) error {
|
|||
if err != nil {
|
||||
key, _ = s.NewKey(fieldName, "")
|
||||
}
|
||||
|
||||
// Add comment from comment tag
|
||||
if len(key.Comment) == 0 {
|
||||
key.Comment = tpField.Tag.Get("comment")
|
||||
}
|
||||
|
||||
if err = reflectWithProperType(tpField.Type, key, field, parseDelim(tpField.Tag.Get("delim"))); err != nil {
|
||||
return fmt.Errorf("error reflecting field (%s): %v", fieldName, err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue