initialised the module

This commit is contained in:
Chris Cowley 2024-09-26 15:34:35 +02:00
parent e6a25d947f
commit 029676e88f
2 changed files with 13 additions and 0 deletions

3
go.mod Normal file
View file

@ -0,0 +1,3 @@
module code.lab.cowley.tech/chris/greetings
go 1.18

10
greetings.go Normal file
View file

@ -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
}