hello2.goΒΆ
// hello2.go
// To run at the command line:
// $ go run hello2.go
package main
import "fmt"
func main() {
fmt.Print("What's your name? ")
var name string
fmt.Scanf("%s", &name)
fmt.Printf("Hi, %v!\n", name)
}
// hello2.go
// To run at the command line:
// $ go run hello2.go
package main
import "fmt"
func main() {
fmt.Print("What's your name? ")
var name string
fmt.Scanf("%s", &name)
fmt.Printf("Hi, %v!\n", name)
}