summaryrefslogtreecommitdiff
path: root/cmd/goaes/commands
diff options
context:
space:
mode:
authorLevi Durfee <levi.durfee@gmail.com>2026-01-07 14:09:15 -0500
committerLevi Durfee <levi.durfee@gmail.com>2026-01-07 14:11:00 -0500
commitfb6725c11a01ac6da64ff9c448e9ee405e16b485 (patch)
tree5260cea7a9329c491bcc6085fc594c98ff6c0300 /cmd/goaes/commands
parentde1db90a04360ae99e0f93c3fca01e1e7713699e (diff)
Add more linters
Diffstat (limited to 'cmd/goaes/commands')
-rw-r--r--cmd/goaes/commands/commands.go3
-rw-r--r--cmd/goaes/commands/decrypt.go2
-rw-r--r--cmd/goaes/commands/encrypt.go2
3 files changed, 5 insertions, 2 deletions
diff --git a/cmd/goaes/commands/commands.go b/cmd/goaes/commands/commands.go
new file mode 100644
index 0000000..f7086a9
--- /dev/null
+++ b/cmd/goaes/commands/commands.go
@@ -0,0 +1,3 @@
+package commands
+
+const fileMode = 0600
diff --git a/cmd/goaes/commands/decrypt.go b/cmd/goaes/commands/decrypt.go
index 8f73c42..1912c1a 100644
--- a/cmd/goaes/commands/decrypt.go
+++ b/cmd/goaes/commands/decrypt.go
@@ -39,7 +39,7 @@ func Decrypt(ctx context.Context, cmd *cli.Command) error {
return err
}
- err = os.WriteFile(destination, plaintext, 0666)
+ err = os.WriteFile(destination, plaintext, fileMode)
if err != nil {
return err
}
diff --git a/cmd/goaes/commands/encrypt.go b/cmd/goaes/commands/encrypt.go
index 47809c4..c658780 100644
--- a/cmd/goaes/commands/encrypt.go
+++ b/cmd/goaes/commands/encrypt.go
@@ -32,7 +32,7 @@ func Encrypt(ctx context.Context, cmd *cli.Command) error {
return err
}
- err = os.WriteFile(destination, dataBuffer.Bytes(), 0666)
+ err = os.WriteFile(destination, dataBuffer.Bytes(), fileMode)
if err != nil {
return err
}