mirror of
https://github.com/restic/restic.git
synced 2025-10-09 02:13:03 +00:00
all: Minor cleanups
if x { return true } return false => return x fmt.Sprintf("%v", x) => fmt.Sprint(x) or x.String() The fmt.Sprintf idiom is still used in the SecretString tests, where it serves security hardening.
This commit is contained in:
2
internal/cache/file_test.go
vendored
2
internal/cache/file_test.go
vendored
@@ -97,7 +97,7 @@ func TestFiles(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, tpe := range tests {
|
||||
t.Run(fmt.Sprintf("%v", tpe), func(t *testing.T) {
|
||||
t.Run(tpe.String(), func(t *testing.T) {
|
||||
ids := generateRandomFiles(t, tpe, c)
|
||||
id := randomID(ids)
|
||||
|
||||
|
Reference in New Issue
Block a user