I'm new at Go. I know it has some scanning functions: scan, sscan, scanf, sscanf and others.
but all of them, and I quote : "storing successive space-separated values", some treat new lines as spaces. but this is not I need.
I've already tried this:
reader := bufio.NewReader(os.Stdin)
input, _ := reader.ReadString('
')
fmt.Printf("Input Char Is : %v", string([]byte(input)[0]))
but this stops after new line not EOF.
I need a way to scan single chars one at a time until EOF. in C I would write:
while (getChar()){
//do stuff
}
What is the equivalent to this in Go?