mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 13:22:16 +08:00
configstruct: skip items with config:"-"
This commit is contained in:
parent
3280b6b83c
commit
7c51b10d15
|
@ -116,6 +116,10 @@ func Items(opt interface{}) (items []Item, err error) {
|
|||
fieldType := defType.Field(i)
|
||||
fieldName := fieldType.Name
|
||||
configName, hasTag := fieldType.Tag.Lookup("config")
|
||||
if hasTag && configName == "-" {
|
||||
// Skip items with config:"-"
|
||||
continue
|
||||
}
|
||||
if !hasTag {
|
||||
configName = camelToSnake(fieldName)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user