This commit is contained in:
Andrew Hurley 2022-11-12 13:46:06 +08:00
commit ecc9101efb
2 changed files with 15 additions and 0 deletions

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module cor.cherished.me/gt/andrew/golang-greetings
go 1.18

12
greetings.go Normal file
View File

@ -0,0 +1,12 @@
package greetings
import "fmt"
// Hello returns a greeting for the named person.
func Hello(name string) string {
// Return a greeting that embeds the name in a message.
message := fmt.Sprintf("Hi, %v. Welcome!", name)
return message
}