Use syscall consts, check for errors,

Also rename func for non-windows specific names.

Signed-off-by: Sachin Joshi <sachin_jayant_joshi@hotmail.com>
This commit is contained in:
Sachin Joshi 2015-03-06 17:04:35 -08:00
parent c23a02e41a
commit 27c2a55648
5 changed files with 40 additions and 30 deletions

View file

@ -30,7 +30,7 @@ func StdStreams() (stdOut io.Writer, stdErr io.Writer, stdIn io.ReadCloser) {
return os.Stdout, os.Stderr, os.Stdin
}
func GetHandleInfo(in interface{}) (uintptr, bool) {
func GetFdInfo(in interface{}) (uintptr, bool) {
var inFd uintptr
var isTerminalIn bool
if file, ok := in.(*os.File); ok {