backwards compatability for io->diskio change

This commit is contained in:
Cameron Sparr 2015-12-15 14:21:02 -06:00
parent 931c706522
commit c3c6292f07
1 changed files with 5 additions and 0 deletions

View File

@ -531,6 +531,11 @@ func (c *Config) addPlugin(name string, table *ast.Table) error {
if len(c.PluginFilters) > 0 && !sliceContains(name, c.PluginFilters) {
return nil
}
// Legacy support renaming io plugin to diskio
if name == "io" {
name = "diskio"
}
creator, ok := plugins.Plugins[name]
if !ok {
return fmt.Errorf("Undefined but requested plugin: %s", name)