initialised the module
This commit is contained in:
parent
e6a25d947f
commit
029676e88f
2 changed files with 13 additions and 0 deletions
3
go.mod
Normal file
3
go.mod
Normal file
|
@ -0,0 +1,3 @@
|
|||
module code.lab.cowley.tech/chris/greetings
|
||||
|
||||
go 1.18
|
10
greetings.go
Normal file
10
greetings.go
Normal 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
|
||||
}
|
Loading…
Add table
Reference in a new issue