I would like to check input is redirected to null device or not in go language.I got one way for unix but I don't how to deal with windows or make it generic.This is what I did for unix
fd := os.Stdin.Fd()
fmt.Print(fmt.Sprint("/proc/self/fd/", fd))
fileName, err1 := os.Readlink(fmt.Sprint("/proc/self/fd/", fd))
if err1 != nil {
fmt.Print(err1)
}
fmt.Println("fileName:", fileName)