Merge pull request #5299 from Martin2112/go_cleanup

A few more small cleanups that should not change behaviour.
This commit is contained in:
Michael Eischer
2025-03-24 13:59:39 +01:00
committed by GitHub
11 changed files with 29 additions and 34 deletions

View File

@@ -64,11 +64,11 @@ func TestRebuildIndex(t *testing.T) {
}
func TestRebuildIndexAlwaysFull(t *testing.T) {
indexFull := index.IndexFull
indexFull := index.Full
defer func() {
index.IndexFull = indexFull
index.Full = indexFull
}()
index.IndexFull = func(*index.Index) bool { return true }
index.Full = func(*index.Index) bool { return true }
testRebuildIndex(t, nil)
}

View File

@@ -302,7 +302,7 @@ func resolvePassword(opts *GlobalOptions, envStr string) (string, error) {
if err != nil {
return "", err
}
return (strings.TrimSpace(string(output))), nil
return strings.TrimSpace(string(output)), nil
}
if opts.PasswordFile != "" {
return loadPasswordFromFile(opts.PasswordFile)