Skip to content

Commit cf84dec

Browse files
committed
Add comment to describe WriteMode mask starting point
1 parent f0aa673 commit cf84dec

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libs/filer/filer.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ type WriteMode int
1818
const writeModePerm = WriteMode(fs.ModePerm)
1919

2020
const (
21+
// Note: these constants are defined as powers of 2 to support combining them using a bit-wise OR.
22+
// They starts from the 10th bit (permission mask + 1) to avoid conflicts with the permission bits.
2123
OverwriteIfExists WriteMode = (writeModePerm + 1) << iota
2224
CreateParentDirectories
2325
)

0 commit comments

Comments
 (0)