main: cast Chmod argument to os.FileMode

This fixes a big red warning in my vim.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2021-03-05 20:50:59 -08:00
parent 69ec21a12f
commit dd6c8d76bb
+1 -1
View File
@@ -142,7 +142,7 @@ func main() {
fmt.Fprintln(os.Stderr, "the path in $XDG_RUNTIME_DIR must be writable by the user") fmt.Fprintln(os.Stderr, "the path in $XDG_RUNTIME_DIR must be writable by the user")
fatal(err) fatal(err)
} }
if err := os.Chmod(root, 0700|os.ModeSticky); err != nil { if err := os.Chmod(root, os.FileMode(0o700)|os.ModeSticky); err != nil {
fmt.Fprintln(os.Stderr, "you should check permission of the path in $XDG_RUNTIME_DIR") fmt.Fprintln(os.Stderr, "you should check permission of the path in $XDG_RUNTIME_DIR")
fatal(err) fatal(err)
} }