mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
17 lines
205 B
Go
17 lines
205 B
Go
// +build !windows
|
|
|
|
package main
|
|
|
|
import (
|
|
"io"
|
|
"os"
|
|
)
|
|
|
|
func stdin() io.Reader {
|
|
stat, err := os.Stdin.Stat()
|
|
if err != nil || (stat.Mode()&os.ModeCharDevice) != 0 {
|
|
return nil
|
|
}
|
|
return os.Stdin
|
|
}
|