File: decrypt.go

package info (click to toggle)
golang-github-proglottis-gpgme 0.0~git20181127.3b0be09-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 156 kB
  • sloc: ansic: 124; makefile: 12
file content (19 lines) | stat: -rw-r--r-- 249 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package main

import (
	"io"
	"os"

	"github.com/proglottis/gpgme"
)

func main() {
	plain, err := gpgme.Decrypt(os.Stdin)
	if err != nil {
		panic(err)
	}
	defer plain.Close()
	if _, err := io.Copy(os.Stdout, plain); err != nil {
		panic(err)
	}
}