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:
parent
1467d845fb
commit
dfe07eaae8
84 changed files with 9904 additions and 196 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue