1
0
Fork 0
pre-commit/testing/resources/golang_hooks_repo/golang-hello-world/main.go
Daniel Baumann ca00e08dce
Adding upstream version 3.0.2.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-09 21:35:53 +01:00

23 lines
324 B
Go

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)
}