Skip to content

Commit

Permalink
rename to setMetricPluginsAndCheckPlugins
Browse files Browse the repository at this point in the history
  • Loading branch information
itchyny committed Feb 1, 2017
1 parent 370dc9d commit 4a46d99
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func LoadConfig(conffile string) (*Config, error) {
return config, err
}

func (conf *Config) buildPlugins() error {
func (conf *Config) setMetricPluginsAndCheckPlugins() error {
if pconfs, ok := conf.Plugin["metrics"]; ok {
var err error
for name, pconf := range pconfs {
Expand Down Expand Up @@ -322,7 +322,7 @@ func loadConfigFile(file string) (*Config, error) {

config.MetricPlugins = make(map[string]*MetricPlugin)
config.CheckPlugins = make(map[string]*CheckPlugin)
if err := config.buildPlugins(); err != nil {
if err := config.setMetricPluginsAndCheckPlugins(); err != nil {
return nil, err
}

Expand Down Expand Up @@ -360,7 +360,7 @@ func includeConfigFile(config *Config, include string) error {
}

// Add new plugin or overwrite a plugin with the same plugin name.
if err := config.buildPlugins(); err != nil {
if err := config.setMetricPluginsAndCheckPlugins(); err != nil {
return err
}
}
Expand Down

0 comments on commit 4a46d99

Please sign in to comment.