Removing DefaultConfig function because there's really no point

This commit is contained in:
Cameron Sparr 2015-08-13 14:25:16 -06:00
parent 4ce61875a4
commit ba1e4917d1
2 changed files with 5 additions and 8 deletions

View File

@ -48,7 +48,9 @@ func main() {
log.Fatal(err)
}
} else {
config = telegraf.DefaultConfig()
fmt.Println("Usage: Telegraf")
flag.PrintDefaults()
return
}
ag, err := telegraf.NewAgent(config)
@ -65,7 +67,7 @@ func main() {
log.Fatal(err)
}
if len(outputs) == 0 {
log.Printf("Error: no ouputs found, did you provide a config file?")
log.Printf("Error: no outputs found, did you provide a valid config file?")
os.Exit(1)
}
@ -74,7 +76,7 @@ func main() {
log.Fatal(err)
}
if len(plugins) == 0 {
log.Printf("Error: no plugins found, did you provide a config file?")
log.Printf("Error: no plugins found, did you provide a valid config file?")
os.Exit(1)
}

View File

@ -253,11 +253,6 @@ func declared(endpoints map[string]*ast.Table) []string {
return names
}
// DefaultConfig returns an empty default configuration
func DefaultConfig() *Config {
return &Config{}
}
var errInvalidConfig = errors.New("invalid configuration")
// LoadConfig loads the given config file and returns a *Config pointer