summaryrefslogtreecommitdiff
path: root/go/hello-world/hello_world.go
diff options
context:
space:
mode:
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 + "!"
+}