exercism/go/hello-world/hello_world.go

12 lines
204 B
Go
Raw Normal View History

2016-08-23 20:47:19 +00:00
package hello
const testVersion = 2
// HelloWorld takes a string (optionally empty) and says hello to it!
func HelloWorld(s string) string {
if s == "" {
s = "World"
}
return "Hello, " + s + "!"
}