rclone/cmd
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
..
about docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
all cmd/gitannex: Add the gitannex subcommand 2024-03-26 09:43:43 +00:00
authorize docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
backend build: modernize Go usage 2025-02-28 11:31:14 +00:00
bisync build: modernize Go usage 2025-02-28 11:31:14 +00:00
cachestats docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
cat build: update logging statements to make json log work - fixes #6038 2024-09-06 17:04:18 +01:00
check docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
checksum docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
cleanup docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
cmount cmount: introduce symlink support #2975 2024-12-13 12:43:20 +00:00
config cmd/config(update remote): introduce --no-output option 2025-01-24 17:22:58 +00:00
copy docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
copyto docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
copyurl docs: fix typos found by codespell in docs and code comments 2025-01-16 10:39:01 +01:00
cryptcheck docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
cryptdecode docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
dedupe build: update logging statements to make json log work - fixes #6038 2024-09-06 17:04:18 +01:00
delete docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
deletefile docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
genautocomplete build: update logging statements to make json log work - fixes #6038 2024-09-06 17:04:18 +01:00
gendocs build: update all dependencies and fix deprecations 2025-02-26 18:00:58 +00:00
gitannex build: modernize Go usage 2025-02-28 11:31:14 +00:00
hashsum docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
link docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
listremotes Make filtering rules for help and listremotes more lenient 2024-08-15 18:45:12 +02:00
ls docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
lsd docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
lsf docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
lsjson docs: group the different options affecting lsjson output 2024-09-07 09:41:08 +01:00
lsl docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
md5sum docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
mkdir docs: group the global flags and make them appear on command and flags pages 2023-08-02 12:53:09 +01:00
mount build: modernize Go usage 2025-02-28 11:31:14 +00:00
mount2 mount2: introduce symlink support #2975 2024-12-13 12:43:20 +00:00
mountlib cmd/mountlib: better snap mount error message 2024-12-06 08:14:09 +00:00
move docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
moveto docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
ncdu build: modernize Go usage 2025-02-28 11:31:14 +00:00
nfsmount serve nfs: implement --nfs-cache-type symlink 2025-01-09 18:55:18 +00:00
obscure docs: add minimum versions to the command pages 2022-12-03 18:58:55 +01:00
purge doc: add note on concurrency of rclone purge 2025-02-13 11:41:37 +00:00
rc build: modernize Go usage 2025-02-28 11:31:14 +00:00
rcat build: update logging statements to make json log work - fixes #6038 2024-09-06 17:04:18 +01:00
rcd build: update logging statements to make json log work - fixes #6038 2024-09-06 17:04:18 +01:00
reveal docs: add minimum versions to the command pages 2022-12-03 18:58:55 +01:00
rmdir docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
rmdirs docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
selfupdate build: modernize Go usage 2025-02-28 11:31:14 +00:00
serve build: modernize Go usage 2025-02-28 11:31:14 +00:00
settier docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
sha1sum docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
size size: make output compatible with -P 2025-01-11 18:39:15 +00:00
sync docs: consistent newline of first line in command output 2024-08-15 18:26:34 +02:00
test build: modernize Go usage 2025-02-28 11:31:14 +00:00
touch touch: make touch obey --transfers 2025-02-21 15:53:47 +00:00
tree build: modernize Go usage 2025-02-28 11:31:14 +00:00
version version: add --deps flag to show dependencies and other build info 2025-01-14 12:08:49 +00:00
cmd.go cmd: fix crash if rclone is invoked without any arguments - Fixes #8378 2025-02-12 21:31:05 +00:00
completion.go cmd: make auto completion work for all shells and reduce the size 2024-02-29 14:46:50 +00:00
help.go build: modernize Go usage 2025-02-28 11:31:14 +00:00
progress.go build: modernize Go usage 2025-02-28 11:31:14 +00:00
selfupdate_disabled.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
selfupdate_enabled.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
siginfo_bsd.go build: update logging statements to make json log work - fixes #6038 2024-09-06 17:04:18 +01:00
siginfo_others.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00