diff --git a/cmd/telegraf/telegraf.go b/cmd/telegraf/telegraf.go index c38d88c3f..2e6ee3fe8 100644 --- a/cmd/telegraf/telegraf.go +++ b/cmd/telegraf/telegraf.go @@ -13,6 +13,7 @@ import ( "syscall" "github.com/influxdata/telegraf/agent" + "github.com/influxdata/telegraf/internal" "github.com/influxdata/telegraf/internal/config" "github.com/influxdata/telegraf/logger" _ "github.com/influxdata/telegraf/plugins/aggregators/all" @@ -192,7 +193,7 @@ func reloadLoop( } func usageExit(rc int) { - fmt.Println(usage) + fmt.Println(internal.Usage) os.Exit(rc) } diff --git a/cmd/telegraf/usage.go b/internal/usage.go similarity index 94% rename from cmd/telegraf/usage.go rename to internal/usage.go index 2d36ede94..4c00d8f83 100644 --- a/cmd/telegraf/usage.go +++ b/internal/usage.go @@ -1,8 +1,8 @@ // +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: diff --git a/cmd/telegraf/usage_windows.go b/internal/usage_windows.go similarity index 95% rename from cmd/telegraf/usage_windows.go rename to internal/usage_windows.go index b09435b9a..109d309ed 100644 --- a/cmd/telegraf/usage_windows.go +++ b/internal/usage_windows.go @@ -1,8 +1,8 @@ // +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: