Interactive Greeting
Wait for user input with fmt.Scanln().
package main
import "fmt"
func main() {
fmt.Println("Welcome!")
fmt.Println("Press Enter to continue...")
fmt.Scanln()
fmt.Println("Let's go!")
}Wait for user input with fmt.Scanln().
package main
import "fmt"
func main() {
fmt.Println("Welcome!")
fmt.Println("Press Enter to continue...")
fmt.Scanln()
fmt.Println("Let's go!")
}💻 Run locally
Copy the code above and run it on your machine