18 lines
219 B
Go
18 lines
219 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
const englishHelloPrefix = "Hello, "
|
|
|
|
func Hello(name string) string {
|
|
if name == "" {
|
|
name = "World"
|
|
}
|
|
|
|
return englishHelloPrefix + name
|
|
}
|
|
|
|
func main() {
|
|
fmt.Println(Hello("world"))
|
|
}
|