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