mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* fn: add test framework * fn: make routes creation smarter * fn: add testframework examples * fn: remove unnecessary dependency * fn: update doc * fn: fix consistenty between runff, runlocaltest and runremotetest
19 lines
264 B
Go
19 lines
264 B
Go
// +build !windows
|
|
|
|
package main
|
|
|
|
import (
|
|
"io"
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
func stdin() io.Reader {
|
|
var stdin io.Reader = os.Stdin
|
|
stat, err := os.Stdin.Stat()
|
|
if err != nil || (stat.Mode()&os.ModeCharDevice) != 0 {
|
|
stdin = strings.NewReader("")
|
|
}
|
|
return stdin
|
|
}
|