pkg/ioutils: format code with gofumpt

Formatting the code with https://github.com/mvdan/gofumpt

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-01-20 14:15:45 +01:00
parent ac1514abf4
commit 79af23e1ea
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -8,14 +8,12 @@ import (
"testing"
)
var (
testMode os.FileMode = 0640
)
var testMode os.FileMode = 0o640
func init() {
// Windows does not support full Linux file mode
if runtime.GOOS == "windows" {
testMode = 0666
testMode = 0o666
}
}
@ -56,7 +54,7 @@ func TestAtomicWriteSetCommit(t *testing.T) {
}
defer os.RemoveAll(tmpDir)
if err := os.Mkdir(filepath.Join(tmpDir, "tmp"), 0700); err != nil {
if err := os.Mkdir(filepath.Join(tmpDir, "tmp"), 0o700); err != nil {
t.Fatalf("Error creating tmp directory: %s", err)
}
@ -104,7 +102,7 @@ func TestAtomicWriteSetCancel(t *testing.T) {
}
defer os.RemoveAll(tmpDir)
if err := os.Mkdir(filepath.Join(tmpDir, "tmp"), 0700); err != nil {
if err := os.Mkdir(filepath.Join(tmpDir, "tmp"), 0o700); err != nil {
t.Fatalf("Error creating tmp directory: %s", err)
}