summaryrefslogtreecommitdiffstats
path: root/testing/resources/golang_hooks_repo/golang-hello-world/main.go
blob: 16857438401cbdfdef13cce2dd5ca208c2bbaaf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package main


import (
	"fmt"
	"runtime"
	"github.com/BurntSushi/toml"
	"os"
)

type Config struct {
	What string
}

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 from %s\n", conf.What, message)
}