From bd4bbed5926db22c62df6b1ad91a9dcabdda34fe Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Sun, 22 Aug 2021 19:07:36 +0200 Subject: [PATCH] config: remove explicit setting of required property to true for options with a default value See #5551 --- backend/koofr/koofr.go | 3 --- backend/tardigrade/fs.go | 7 +++---- backend/union/union.go | 28 ++++++++++++---------------- 3 files changed, 15 insertions(+), 23 deletions(-) diff --git a/backend/koofr/koofr.go b/backend/koofr/koofr.go index f6e508277..2602001a7 100644 --- a/backend/koofr/koofr.go +++ b/backend/koofr/koofr.go @@ -34,18 +34,15 @@ func init() { Name: "endpoint", Help: "The Koofr API endpoint to use.", Default: "https://app.koofr.net", - Required: true, Advanced: true, }, { Name: "mountid", Help: "Mount ID of the mount to use.\n\nIf omitted, the primary mount is used.", - Default: "", Advanced: true, }, { Name: "setmtime", Help: "Does the backend support setting modification time.\n\nSet this to false if you use a mount ID that points to a Dropbox or Amazon Drive backend.", Default: true, - Required: true, Advanced: true, }, { Name: "user", diff --git a/backend/tardigrade/fs.go b/backend/tardigrade/fs.go index 04aa479cd..bd6a591d3 100644 --- a/backend/tardigrade/fs.go +++ b/backend/tardigrade/fs.go @@ -84,10 +84,9 @@ func init() { }, Options: []fs.Option{ { - Name: fs.ConfigProvider, - Help: "Choose an authentication method.", - Required: true, - Default: existingProvider, + Name: fs.ConfigProvider, + Help: "Choose an authentication method.", + Default: existingProvider, Examples: []fs.OptionExample{{ Value: "existing", Help: "Use an existing access grant.", diff --git a/backend/union/union.go b/backend/union/union.go index f26bdd114..0b01bddce 100644 --- a/backend/union/union.go +++ b/backend/union/union.go @@ -33,25 +33,21 @@ func init() { Help: "List of space separated upstreams.\n\nCan be 'upstreama:test/dir upstreamb:', '\"upstreama:test/space:ro dir\" upstreamb:', etc.", Required: true, }, { - Name: "action_policy", - Help: "Policy to choose upstream on ACTION category.", - Required: true, - Default: "epall", + Name: "action_policy", + Help: "Policy to choose upstream on ACTION category.", + Default: "epall", }, { - Name: "create_policy", - Help: "Policy to choose upstream on CREATE category.", - Required: true, - Default: "epmfs", + Name: "create_policy", + Help: "Policy to choose upstream on CREATE category.", + Default: "epmfs", }, { - Name: "search_policy", - Help: "Policy to choose upstream on SEARCH category.", - Required: true, - Default: "ff", + Name: "search_policy", + Help: "Policy to choose upstream on SEARCH category.", + Default: "ff", }, { - Name: "cache_time", - Help: "Cache time of usage and free space (in seconds).\n\nThis option is only useful when a path preserving policy is used.", - Required: true, - Default: 120, + Name: "cache_time", + Help: "Cache time of usage and free space (in seconds).\n\nThis option is only useful when a path preserving policy is used.", + Default: 120, }}, } fs.Register(fsi)