Move usage string to internal to fix `go run`

This commit is contained in:
Daniel Nelson 2018-05-04 14:16:21 -07:00
parent 757e23a5f2
commit 7c0754ebe5
No known key found for this signature in database
GPG Key ID: CAAD59C9444F6155
3 changed files with 6 additions and 5 deletions

View File

@ -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)
} }

View File

@ -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:

View File

@ -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: