diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-30 16:53:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-01-30 16:53:22 +0000 |
commit | ce6763317433ca8509f45bd1d471fb4ad2eeffdd (patch) | |
tree | a648ad7d54a5d3ffaa8519e7c73ea27541105c9b /testing/resources/golang_hooks_repo | |
parent | Releasing debian version 2.21.0-1. (diff) | |
download | pre-commit-ce6763317433ca8509f45bd1d471fb4ad2eeffdd.tar.xz pre-commit-ce6763317433ca8509f45bd1d471fb4ad2eeffdd.zip |
Merging upstream version 3.0.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/resources/golang_hooks_repo')
-rw-r--r-- | testing/resources/golang_hooks_repo/golang-hello-world/main.go | 8 |
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) } |