summaryrefslogtreecommitdiffstats
path: root/testing/resources/golang_hooks_repo/golang-hello-world/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'testing/resources/golang_hooks_repo/golang-hello-world/main.go')
-rw-r--r--testing/resources/golang_hooks_repo/golang-hello-world/main.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/testing/resources/golang_hooks_repo/golang-hello-world/main.go b/testing/resources/golang_hooks_repo/golang-hello-world/main.go
index 1e3c591..1685743 100644
--- a/testing/resources/golang_hooks_repo/golang-hello-world/main.go
+++ b/testing/resources/golang_hooks_repo/golang-hello-world/main.go
@@ -3,7 +3,9 @@ package main
import (
"fmt"
+ "runtime"
"github.com/BurntSushi/toml"
+ "os"
)
type Config struct {
@@ -11,7 +13,11 @@ type Config struct {
}
func main() {
+ message := runtime.Version()
+ if len(os.Args) > 1 {
+ message = os.Args[1]
+ }
var conf Config
toml.Decode("What = 'world'\n", &conf)
- fmt.Printf("hello %v\n", conf.What)
+ fmt.Printf("hello %v from %s\n", conf.What, message)
}