How to read keyboard input (standard input) in the console in Go?
I just started learning Go and I have a simple but important problem. I need to write a program that asks the user for a name and age, and then outputs a greeting. But I can't figure out how to properly read a string or number from the console.\n\nIn other languages (e.g., Python) I just used `input()`, and in C++ — `cin`. In Go, however, I see many ways: `bufio`, `fmt.Scan`, `os.Stdin`, and this confuses me. I tried the most obvious option:\n\n```go\npackage main\n\nimport "fmt"\n\nfunc main() {\n var name string\n fmt.Print("Enter name: ")\n fmt.Scan(&name)\n fmt.Println("Hello,", name)\n}\n```\n\nBut when I enter "Ivan Ivanov", the program prints only "Hello, Ivan", and the second word is lost. Also, I don't understand how to read a number and handle an error.