| main.go | |
| // Command hello greets the world. | |
| package main | |
| import "fmt" | |
| func main() { | |
| - | fmt.Println(greeting("world")) |
| + | fmt.Println(greeting("world") + "!") |
| } | |
| func greeting(who string) string { | |
| return "hello, " + who | |
| } | |
| main.go | |
| // Command hello greets the world. | |
| package main | |
| import "fmt" | |
| func main() { | |
| - | fmt.Println(greeting("world")) |
| + | fmt.Println(greeting("world") + "!") |
| } | |
| func greeting(who string) string { | |
| return "hello, " + who | |
| } | |