diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..5ef13a5 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module code.lab.cowley.tech/chris/greetings + +go 1.18 diff --git a/greetings.go b/greetings.go new file mode 100644 index 0000000..e66d285 --- /dev/null +++ b/greetings.go @@ -0,0 +1,10 @@ +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 +}