rclone/backend/local
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_unix.go build: fix linting issues reported by running golangci-lint with different GOOS 2024-04-22 19:29:12 +02:00
about_windows.go Replace Windows-specific NewLazyDLL with NewLazySystemDLL 2025-01-08 17:35:00 +01:00
clone_darwin.go local: fix --copy-links on macOS when cloning 2024-09-20 17:43:52 +01:00
fadvise_other.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
fadvise_unix.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
lchmod_unix.go local: fix permission and ownership on symlinks with --links and --metadata 2024-11-14 16:20:18 +00:00
lchmod.go local: fix permission and ownership on symlinks with --links and --metadata 2024-11-14 16:20:18 +00:00
lchtimes_unix.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
lchtimes_windows.go local: fix permission and ownership on symlinks with --links and --metadata 2024-11-14 16:20:18 +00:00
lchtimes.go local: fix permission and ownership on symlinks with --links and --metadata 2024-11-14 16:20:18 +00:00
local_internal_test.go build: modernize Go usage 2025-02-28 11:31:14 +00:00
local_test.go backend: allow wrapping backend tests to run in make quicktest 2022-06-29 17:30:37 +01:00
local.go build: modernize Go usage 2025-02-28 11:31:14 +00:00
metadata_bsd.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
metadata_linux.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
metadata_other.go build: fix linting issues reported by running golangci-lint with different GOOS 2024-04-22 19:29:12 +02:00
metadata_unix.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
metadata_windows.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
metadata.go local: fix permission and ownership on symlinks with --links and --metadata 2024-11-14 16:20:18 +00:00
read_device_other.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
read_device_unix.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
remove_other.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
remove_test.go Replace deprecated ioutil 2022-11-07 11:41:47 +00:00
remove_windows.go build: fix linting issues reported by golangci-lint on windows 2024-04-22 19:29:12 +02:00
setbtime_windows.go local: fix permission and ownership on symlinks with --links and --metadata 2024-11-14 16:20:18 +00:00
setbtime.go local: fix permission and ownership on symlinks with --links and --metadata 2024-11-14 16:20:18 +00:00
symlink_other.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
symlink.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00
tests_test.go local: refactor default os encoding out from local backend into shared encoder lib 2021-08-19 20:14:50 +02:00
xattr_unsupported.go build: fix linting issues reported by running golangci-lint with different GOOS 2024-04-22 19:29:12 +02:00
xattr.go build: remove build constraint syntax for go 1.16 and older 2024-04-18 16:53:55 +02:00