github.com/devcamcar/cli@v0.0.0-20181107134215-706a05759d18/commands/invoke_others.go (about) 1 // +build !windows 2 3 package commands 4 5 import ( 6 "io" 7 "os" 8 ) 9 10 func stdin() io.Reader { 11 stat, err := os.Stdin.Stat() 12 if err != nil || (stat.Mode()&os.ModeCharDevice) != 0 { 13 return nil 14 } 15 return os.Stdin 16 }