added initial hello world go code master
authorhackbard <hackbard@hackdaworld.org>
Wed, 1 Oct 2014 22:29:55 +0000 (00:29 +0200)
committerhackbard <hackbard@hackdaworld.org>
Wed, 1 Oct 2014 22:29:55 +0000 (00:29 +0200)
hello/hello.go [new file with mode: 0644]
world/announce.go [new file with mode: 0644]

diff --git a/hello/hello.go b/hello/hello.go
new file mode 100644 (file)
index 0000000..e455c41
--- /dev/null
@@ -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 (file)
index 0000000..79071b8
--- /dev/null
@@ -0,0 +1,6 @@
+package world
+
+func Announce() string {
+       return ("World")
+}
+