From ce6763317433ca8509f45bd1d471fb4ad2eeffdd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 30 Jan 2023 17:53:22 +0100 Subject: Merging upstream version 3.0.2. Signed-off-by: Daniel Baumann --- testing/resources/golang_hooks_repo/golang-hello-world/main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'testing/resources/golang_hooks_repo') 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) } -- cgit v1.2.3