Compare commits

...

1 commit

Author SHA1 Message Date
d5ab4eeb57
first hello module 2024-03-18 17:30:03 +01:00
3 changed files with 26 additions and 0 deletions

3
hello/go.mod Normal file
View file

@ -0,0 +1,3 @@
module hello
go 1.22.1

11
hello/hello.go Normal file
View file

@ -0,0 +1,11 @@
package main
import "fmt"
func Hello() string {
return "Hello, world!"
}
func main () {
fmt.Println(Hello())
}

12
hello/hello_test.go Normal file
View file

@ -0,0 +1,12 @@
package main
import "testing"
func TestHello(t *testing.T) {
given := Hello()
expected := "Hello, world!"
if given != expected {
t.Errorf("given: %v, expected: %v", given, expected)
}
}