Merge pull request #161 from AlphaB/master

Do not use flag before flag.Parse() was called
pull/163/head
Fabian Reinartz 2015-11-06 17:54:28 +01:00
commit e55e50bd57
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,6 @@ type ntpCollector struct {
}
func init() {
ntp.Version = byte(*ntpProtocolVersion)
Factories["ntp"] = NewNtpCollector
}
@ -45,6 +44,7 @@ func NewNtpCollector() (Collector, error) {
if *ntpServer == "" {
return nil, fmt.Errorf("no NTP server specifies, see --ntpServer")
}
ntp.Version = byte(*ntpProtocolVersion)
return &ntpCollector{
drift: prometheus.NewGauge(prometheus.GaugeOpts{