Move usage string to internal to fix `go run`
This commit is contained in:
parent
757e23a5f2
commit
7c0754ebe5
|
@ -13,6 +13,7 @@ import (
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/influxdata/telegraf/agent"
|
"github.com/influxdata/telegraf/agent"
|
||||||
|
"github.com/influxdata/telegraf/internal"
|
||||||
"github.com/influxdata/telegraf/internal/config"
|
"github.com/influxdata/telegraf/internal/config"
|
||||||
"github.com/influxdata/telegraf/logger"
|
"github.com/influxdata/telegraf/logger"
|
||||||
_ "github.com/influxdata/telegraf/plugins/aggregators/all"
|
_ "github.com/influxdata/telegraf/plugins/aggregators/all"
|
||||||
|
@ -192,7 +193,7 @@ func reloadLoop(
|
||||||
}
|
}
|
||||||
|
|
||||||
func usageExit(rc int) {
|
func usageExit(rc int) {
|
||||||
fmt.Println(usage)
|
fmt.Println(internal.Usage)
|
||||||
os.Exit(rc)
|
os.Exit(rc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// +build !windows
|
// +build !windows
|
||||||
|
|
||||||
package main
|
package internal
|
||||||
|
|
||||||
const usage = `Telegraf, The plugin-driven server agent for collecting and reporting metrics.
|
const Usage = `Telegraf, The plugin-driven server agent for collecting and reporting metrics.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// +build windows
|
// +build windows
|
||||||
|
|
||||||
package main
|
package internal
|
||||||
|
|
||||||
const usage = `Telegraf, The plugin-driven server agent for collecting and reporting metrics.
|
const Usage = `Telegraf, The plugin-driven server agent for collecting and reporting metrics.
|
||||||
|
|
||||||
Usage:
|
Usage:
|
||||||
|
|
Loading…
Reference in New Issue