Refactor to use a constant

This commit is contained in:
Oliver Davies 2022-01-26 18:00:00 +00:00
parent c715ac45e7
commit a857ef5957

View file

@ -2,8 +2,10 @@ package main
import "fmt"
const englishHelloPrefix = "Hello, "
func Hello(name string) string {
return "Hello, " + name
return englishHelloPrefix + name
}
func main() {