diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..e4c951f --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.brueck.tools/jackhead/go-playground.git + +go 1.24.1 diff --git a/helloWorld/hello.go b/helloWorld/hello.go new file mode 100644 index 0000000..cfc77da --- /dev/null +++ b/helloWorld/hello.go @@ -0,0 +1,14 @@ +package helloworld + +func Greeting(mood int) string { + switch mood { + case 0: + return "Hello cruel world!" + case 1: + return "Hello crude world!" + case 2: + return "Hello cool world!" + default: + return "Aye mate!" + } +} diff --git a/main/main b/main/main new file mode 100755 index 0000000..94c0218 Binary files /dev/null and b/main/main differ diff --git a/main/main.go b/main/main.go new file mode 100644 index 0000000..bcd6baf --- /dev/null +++ b/main/main.go @@ -0,0 +1,13 @@ +package main + +import ( + "fmt" + + helloworld "git.brueck.tools/jackhead/go-playground.git/helloWorld" +) + +func main() { + for i := range 5 { + fmt.Println(helloworld.Greeting(i)) + } +}