build: fix govet lint errors with golangci-lint v1.60.1

There were a lot of instances of this lint error

    printf: non-constant format string in call to github.com/rclone/rclone/fs.Logf (govet)

Which were fixed by re-arranging the arguments and adding "%s".

There were quite a few genuine bugs which were found too.
This commit is contained in:
Nick Craig-Wood
2024-08-14 18:19:36 +01:00
parent 83613634f9
commit 61b27cda80
12 changed files with 27 additions and 17 deletions

View File

@ -154,7 +154,7 @@ func TestCmdTest(t *testing.T) {
// Test simple call and output from rclone
out, err := rclone("version")
t.Logf("rclone version\n" + out)
t.Log("rclone version\n" + out)
if assert.NoError(t, err) {
assert.Contains(t, out, "rclone v")
assert.Contains(t, out, "version: ")
@ -208,7 +208,7 @@ func TestCmdTest(t *testing.T) {
// Test access to config file and simple test data
out, err = rclone("lsl", "myLocal:"+testFolder)
t.Logf("rclone lsl myLocal:testFolder\n" + out)
t.Log("rclone lsl myLocal:testFolder\n" + out)
if assert.NoError(t, err) {
assert.Contains(t, out, "rclone.config")
assert.Contains(t, out, "testdata/folderA/fileA1.txt")