var input = bufio.NewScanner(os.Stdin) // Takes user input
...
command = input.Text() // Stores user input
input.Scan() //stores user input
switch command {
case " ":
break
case "":
if err := input.Err(); err == nil && len(command) == 0 {
if err != io.ErrUnexpectedEOF {
// EOF support
extras.LeaveEOF()
}
} extras.Leave(command) // Check if command is exit or ^D
}
// So this is the problem area from what I can tell.
-j