Switch to kingpin flags (#639)

* Switch to kingpin flags

* Fix logrus vendoring

* Fix flags in main tests

* Fix vendoring versions
This commit is contained in:
Calle Pettersson 2017-08-12 15:07:24 +02:00 committed by Ben Kochie
commit dfe07eaae8
84 changed files with 9904 additions and 196 deletions

View file

@ -14,16 +14,16 @@
package collector
import (
"flag"
"path"
"github.com/prometheus/procfs"
"gopkg.in/alecthomas/kingpin.v2"
)
var (
// The path of the proc filesystem.
procPath = flag.String("collector.procfs", procfs.DefaultMountPoint, "procfs mountpoint.")
sysPath = flag.String("collector.sysfs", "/sys", "sysfs mountpoint.")
procPath = kingpin.Flag("collector.procfs", "procfs mountpoint.").Default(procfs.DefaultMountPoint).String()
sysPath = kingpin.Flag("collector.sysfs", "sysfs mountpoint.").Default("/sys").String()
)
func procFilePath(name string) string {