diff options
| author | Levi Durfee <levi.durfee@gmail.com> | 2026-01-08 18:14:50 -0500 |
|---|---|---|
| committer | Levi Durfee <levi.durfee@gmail.com> | 2026-01-08 18:19:26 -0500 |
| commit | 496c557b041ae17557c99e8a0092e21431a2242d (patch) | |
| tree | 81a3769dcd822245ae3ac20b05bb4ac510436d43 /cmd/goaes/commands/encrypt.go | |
| parent | 6bf86ba37918b918cd8bf432757c00f69d35b85f (diff) | |
Simplify encrypt command
Diffstat (limited to 'cmd/goaes/commands/encrypt.go')
| -rw-r--r-- | cmd/goaes/commands/encrypt.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cmd/goaes/commands/encrypt.go b/cmd/goaes/commands/encrypt.go index df707cb..223502b 100644 --- a/cmd/goaes/commands/encrypt.go +++ b/cmd/goaes/commands/encrypt.go @@ -12,8 +12,12 @@ import ( ) func Encrypt(ctx context.Context, cmd *cli.Command) error { - source := cmd.String("source") - destination := cmd.String("destination") + source := cmd.StringArg("source") + destination := cmd.StringArg("destination") + + if destination == "" { + destination = source + ".goaes" + } source = filepath.Clean(source) plaintext, err := os.ReadFile(source) |
