chore: use errors.New to replace fmt.Errorf with no parameters will much better (#4778)

This commit is contained in:
Andi
2024-08-28 12:45:57 +08:00
committed by GitHub
parent 27aef4ac2e
commit ae1841efb0

View File

@@ -89,7 +89,7 @@ func (i *Importer) fileJSONToFile(ctx context.Context, fileJSON jsonschema.DirEn
return i.baseFileJSONToBaseFile(ctx, ff)
}
return nil, fmt.Errorf("unknown file type")
return nil, errors.New("unknown file type")
}
func (i *Importer) baseFileJSONToBaseFile(ctx context.Context, baseJSON *jsonschema.BaseFile) (*models.BaseFile, error) {