Maintain mask invariant

This commit is contained in:
Pieter Noordhuis 2024-11-19 16:54:11 +01:00
parent 092bc46976
commit 2bcd212531
No known key found for this signature in database
GPG Key ID: 12ACCCC104CF2930
2 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,7 @@ type WriteMode int
const writeModePerm = WriteMode(fs.ModePerm)
const (
OverwriteIfExists WriteMode = writeModePerm + 1<<iota
OverwriteIfExists WriteMode = (writeModePerm + 1) << iota
CreateParentDirectories
)

View File

@ -8,4 +8,5 @@ import (
func TestWriteMode(t *testing.T) {
assert.Equal(t, 512, int(OverwriteIfExists))
assert.Equal(t, 1024, int(CreateParentDirectories))
}