I want to display a "> ", and then have the program wait for the user to type something into the command line and hit enter (and ultimately store that as a byte slice). In Java I would have done something like:
Scanner scanner = new Scanner(System.in);
System.out.print("> ");
String sentence = scanner.nextLine();
I've tried some things involving os.Args, console.ReadBytes('
')
, and bufio.NewReader(os.Stdin)
, but I still haven't figured it out. Any suggestions would be greatly appreciated. Thanks.