diff options
Diffstat (limited to '')
-rw-r--r-- | testing/resources/golang_hooks_repo/.pre-commit-hooks.yaml | 5 | ||||
-rw-r--r-- | testing/resources/golang_hooks_repo/golang-hello-world/main.go | 17 |
2 files changed, 22 insertions, 0 deletions
diff --git a/testing/resources/golang_hooks_repo/.pre-commit-hooks.yaml b/testing/resources/golang_hooks_repo/.pre-commit-hooks.yaml new file mode 100644 index 0000000..206733b --- /dev/null +++ b/testing/resources/golang_hooks_repo/.pre-commit-hooks.yaml @@ -0,0 +1,5 @@ +- id: golang-hook + name: golang example hook + entry: golang-hello-world + language: golang + files: '' diff --git a/testing/resources/golang_hooks_repo/golang-hello-world/main.go b/testing/resources/golang_hooks_repo/golang-hello-world/main.go new file mode 100644 index 0000000..1e3c591 --- /dev/null +++ b/testing/resources/golang_hooks_repo/golang-hello-world/main.go @@ -0,0 +1,17 @@ +package main + + +import ( + "fmt" + "github.com/BurntSushi/toml" +) + +type Config struct { + What string +} + +func main() { + var conf Config + toml.Decode("What = 'world'\n", &conf) + fmt.Printf("hello %v\n", conf.What) +} |