This commit is contained in:
parent
26706e014d
commit
4b865f379b
8
hello.go
8
hello.go
|
@ -11,13 +11,17 @@ func Hello(name string, language string) string {
|
||||||
name = "World"
|
name = "World"
|
||||||
}
|
}
|
||||||
|
|
||||||
prefix := englishHelloPrefix
|
return greetingPrefix(language) + name
|
||||||
|
}
|
||||||
|
|
||||||
|
func greetingPrefix(language string) (prefix string) {
|
||||||
|
prefix = englishHelloPrefix
|
||||||
|
|
||||||
if language == welsh {
|
if language == welsh {
|
||||||
prefix = welshHelloPrefix
|
prefix = welshHelloPrefix
|
||||||
}
|
}
|
||||||
|
|
||||||
return prefix + name
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
Loading…
Reference in a new issue