support pipes
This commit is contained in:
parent
8223e02e50
commit
7a6c0df33a
3
gpgit.go
3
gpgit.go
@ -163,9 +163,12 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if fi.Mode()&os.ModeNamedPipe == 0 {
|
||||||
if fi.Size() == 0 {
|
if fi.Size() == 0 {
|
||||||
log.Fatal("stdin is empty")
|
log.Fatal("stdin is empty")
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
data, err := ioutil.ReadAll(os.Stdin)
|
data, err := ioutil.ReadAll(os.Stdin)
|
||||||
rawEml := string(data)
|
rawEml := string(data)
|
||||||
|
Loading…
Reference in New Issue
Block a user