--help improved

This commit is contained in:
Daniel Czerwonk 2017-03-14 17:23:23 +01:00
parent 941a912f95
commit b513dc6d04

View File

@ -11,7 +11,7 @@ import (
"os"
)
const version string = "0.5"
const version string = "0.5.1"
var (
showVersion = flag.Bool("version", false, "Print version information.")
@ -22,6 +22,13 @@ var (
bird6Enabled = flag.Bool("bird.ipv6", true, "Get protocols from bird6")
)
func init() {
flag.Usage = func() {
fmt.Println("Usage: bird_exporter [ ... ]\n\nParameters:\n")
flag.PrintDefaults()
}
}
func main() {
flag.Parse()