From: Sergey Matveev Date: Thu, 9 Jan 2025 15:12:41 +0000 (+0300) Subject: Ability to pass additional arguments to gpg X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=fa938508023bc1074edc45405e71367534185d82d95f8387f8bb2deee8ddbec3;p=pgpmaildecryptor.git Ability to pass additional arguments to gpg --- diff --git a/main.go b/main.go index 50dd1d9..341c921 100644 --- a/main.go +++ b/main.go @@ -41,7 +41,9 @@ func main() { } var rawDec []byte { - cmd := exec.Command("gpg", "--batch", "--decrypt", "--status-fd", "3") + args := []string{"--batch", "--decrypt", "--status-fd", "3"} + args = append(args, os.Args[1:]...) + cmd := exec.Command("gpg", args...) cmd.Stderr = os.Stderr var stdin io.WriteCloser stdin, err = cmd.StdinPipe()