From 7fe8bdc9148af6f26b1554573db4301487e1689a Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 27 Jan 2022 00:12:35 +0000 Subject: [PATCH] Refactor: add a welsh hello prefix constant --- hello.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hello.go b/hello.go index 649e726..03ea2c2 100644 --- a/hello.go +++ b/hello.go @@ -3,6 +3,7 @@ package main import "fmt" const englishHelloPrefix = "Hello, " +const welshHelloPrefix = "Helo, " func Hello(name string, language string) string { if name == "" { @@ -10,7 +11,7 @@ func Hello(name string, language string) string { } if language == "Welsh" { - return "Helo, " + name + return welshHelloPrefix + name } return englishHelloPrefix + name