I would like to read standard input from the command line, but my attempts have ended with the program exiting before I\'m prompted for input. I\'m looking for the equivalen
I'm late to the party. But how about one liner:
data, err := ioutil.ReadAll(os.Stdin)
and press ctrl+d (EOT) once input is entered on command line.