rclone/fs/config
Nick Craig-Wood 401cf81034 build: modernize Go usage
This commit modernizes Go usage. This was done with:

go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix -test ./...

Then files needed to be `go fmt`ed and a few comments needed to be
restored.

The modernizations include replacing

- if/else conditional assignment by a call to the built-in min or max functions added in go1.21
- sort.Slice(x, func(i, j int) bool) { return s[i] < s[j] } by a call to slices.Sort(s), added in go1.21
- interface{} by the 'any' type added in go1.18
- append([]T(nil), s...) by slices.Clone(s) or slices.Concat(s), added in go1.21
- loop around an m[k]=v map update by a call to one of the Collect, Copy, Clone, or Insert functions from the maps package, added in go1.21
- []byte(fmt.Sprintf...) by fmt.Appendf(nil, ...), added in go1.19
- append(s[:i], s[i+1]...) by slices.Delete(s, i, i+1), added in go1.21
- a 3-clause for i := 0; i < n; i++ {} loop by for i := range n {}, added in go1.22
2025-02-28 11:31:14 +00:00
..
configfile docs: fix some function names in comments 2024-09-02 18:20:08 +02:00
configflags build: update logging statements to make json log work - fixes #6038 2024-09-06 17:04:18 +01:00
configmap all: fix spelling across the project 2022-08-30 11:16:26 +02:00
configstruct build: modernize Go usage 2025-02-28 11:31:14 +00:00
flags fs: fix setting stringArray config values from environment variables 2024-09-13 15:52:51 +01:00
obscure build: update logging statements to make json log work - fixes #6038 2024-09-06 17:04:18 +01:00
testdata Convert source files with crlf to lf 2024-04-18 11:32:45 +02:00
authorize.go fs: refactor fs.ConfigMap to take a prefix and Options rather than an fs.RegInfo 2024-07-15 11:09:53 +01:00
config.go build: modernize Go usage 2025-02-28 11:31:14 +00:00
config_read_password.go build: update logging statements to make json log work - fixes #6038 2024-09-06 17:04:18 +01:00
config_read_password_unsupported.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
config_test.go config: use --password-command to set config file password if supplied 2024-09-06 10:34:29 +01:00
crypt.go config encryption: set, remove and check to manage config file encryption #7859 2024-09-06 10:34:29 +01:00
crypt_internal_test.go config encryption: set, remove and check to manage config file encryption #7859 2024-09-06 10:34:29 +01:00
crypt_test.go config encryption: set, remove and check to manage config file encryption #7859 2024-09-06 10:34:29 +01:00
default_storage.go config: replace defaultConfig with a thread-safe in-memory implementation 2021-05-07 16:04:09 +01:00
default_storage_test.go config: replace defaultConfig with a thread-safe in-memory implementation 2021-05-07 16:04:09 +01:00
rc.go cmd/config(update remote): introduce --no-output option 2025-01-24 17:22:58 +00:00
rc_test.go config: make getting config values more consistent 2024-08-08 13:41:31 +01:00
ui.go build: modernize Go usage 2025-02-28 11:31:14 +00:00
ui_test.go build: fix gocritic lint issue assignop 2024-08-15 22:08:34 +01:00