windows - is there any generic way to check os.Stdin or input redirected from null device? -


i check input redirected null device or not in go language.i got 1 way unix don't how deal windows or make generic.this did 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) 


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -