From: hackbard Date: Wed, 1 Oct 2014 22:29:55 +0000 (+0200) Subject: added initial hello world go code X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=a1c71d9ba54f9f92224bee54ec74818c8c938dd8;p=outofuni%2Fgo-intro.git added initial hello world go code --- a1c71d9ba54f9f92224bee54ec74818c8c938dd8 diff --git a/hello/hello.go b/hello/hello.go new file mode 100644 index 0000000..e455c41 --- /dev/null +++ b/hello/hello.go @@ -0,0 +1,13 @@ +package main + +import ( + "fmt" + "hackdaworld.org/hackbard/go-intro/world" + "time" +) + +func main() { + fmt.Printf("Hello, %s", world.Announce()) + fmt.Printf(" at %s.\n", time.Now()) +} + diff --git a/world/announce.go b/world/announce.go new file mode 100644 index 0000000..79071b8 --- /dev/null +++ b/world/announce.go @@ -0,0 +1,6 @@ +package world + +func Announce() string { + return ("World") +} +