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

@ -16,17 +16,13 @@
package collector
import (
"flag"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/log"
"github.com/soundcloud/go-runit/runit"
"gopkg.in/alecthomas/kingpin.v2"
)
var runitServiceDir = flag.String(
"collector.runit.servicedir",
"/etc/service",
"Path to runit service directory.")
var runitServiceDir = kingpin.Flag("collector.runit.servicedir", "Path to runit service directory.").Default("/etc/service").String()
type runitCollector struct {
state, stateDesired, stateNormal, stateTimestamp typedDesc