Prefer fmt.Errorf(s) to errors.New(fmt.Sprintf(s))

This commit is contained in:
Rob Mulholand
2019-10-31 13:33:39 -05:00
parent eb2f3c2209
commit 0ded7bcd62
5 changed files with 12 additions and 16 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ func (pluginConfig *Plugin) GetMigrationsPaths() ([]string, error) {
if ok {
conflictingPath := paths[transformer.MigrationRank]
if conflictingPath != cleanPath {
return nil, errors.New(fmt.Sprintf("transformer %s has the same migration rank (%d) as another transformer", name, transformer.MigrationRank))
return nil, fmt.Errorf("transformer %s has the same migration rank (%d) as another transformer", name, transformer.MigrationRank)
}
}
paths[transformer.MigrationRank] = cleanPath