From fb6725c11a01ac6da64ff9c448e9ee405e16b485 Mon Sep 17 00:00:00 2001 From: Levi Durfee Date: Wed, 7 Jan 2026 14:09:15 -0500 Subject: Add more linters --- cmd/goaes/commands/commands.go | 3 +++ cmd/goaes/commands/decrypt.go | 2 +- cmd/goaes/commands/encrypt.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 cmd/goaes/commands/commands.go (limited to 'cmd') 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 } -- cgit v1.2.3