summaryrefslogtreecommitdiff
path: root/go/hello-world/hello_world.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-08-25 03:13:39 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-08-25 03:13:39 +0200
commit509c5063d66e8bbef4ec1def1c99c318be51aceb (patch)
treeafc811c4781a4e317043e2a0237499defc168044 /go/hello-world/hello_world.go
Initial import
Diffstat (limited to 'go/hello-world/hello_world.go')
-rw-r--r--go/hello-world/hello_world.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/go/hello-world/hello_world.go b/go/hello-world/hello_world.go
new file mode 100644
index 0000000..590df4e
--- /dev/null
+++ b/go/hello-world/hello_world.go
@@ -0,0 +1,11 @@
+package hello
+
+const testVersion = 2
+
+// HelloWorld greets the World
+func HelloWorld(s string) string {
+ if s == "" {
+ s = "World"
+ }
+ return "Hello, " + s + "!"
+}