mirror of
https://github.com/rclone/rclone.git
synced 2024-11-26 02:14:42 +01: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)
|
fieldType := defType.Field(i)
|
||||||
fieldName := fieldType.Name
|
fieldName := fieldType.Name
|
||||||
configName, hasTag := fieldType.Tag.Lookup("config")
|
configName, hasTag := fieldType.Tag.Lookup("config")
|
||||||
|
if hasTag && configName == "-" {
|
||||||
|
// Skip items with config:"-"
|
||||||
|
continue
|
||||||
|
}
|
||||||
if !hasTag {
|
if !hasTag {
|
||||||
configName = camelToSnake(fieldName)
|
configName = camelToSnake(fieldName)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user