From ae1841efb02ecf2fb02e842e10e089cb57db914a Mon Sep 17 00:00:00 2001 From: Andi <36215014+ChengenH@users.noreply.github.com> Date: Wed, 28 Aug 2024 12:45:57 +0800 Subject: [PATCH] chore: use errors.New to replace fmt.Errorf with no parameters will much better (#4778) --- pkg/file/import.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/file/import.go b/pkg/file/import.go index 0af94a4d2..7c28197b8 100644 --- a/pkg/file/import.go +++ b/pkg/file/import.go @@ -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) {