From 92e15443005c2793df09c89949433765f8be43eb Mon Sep 17 00:00:00 2001 From: David Poros Date: Mon, 21 Oct 2019 14:51:12 +0200 Subject: [PATCH] Fix staticcheck error ST1005 --- parse.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parse.go b/parse.go index 71ac00a..6f16a7d 100644 --- a/parse.go +++ b/parse.go @@ -42,13 +42,13 @@ func ParseSource(data interface{}) (*ast.File, *token.FileSet, error) { func ParseAndTypeCheckFile(file string, flags ...string) (*ast.File, *token.FileSet, *types.Package, *types.Info, error) { fileAbs, err := filepath.Abs(file) if err != nil { - return nil, nil, nil, nil, fmt.Errorf("Could not absolute the file path of %q: %v", file, err) + return nil, nil, nil, nil, fmt.Errorf("could not absolute the file path of %q: %v", file, err) } dir := filepath.Dir(fileAbs) buildPkg, err := build.ImportDir(dir, build.FindOnly) if err != nil { - return nil, nil, nil, nil, fmt.Errorf("Could not create build package of %q: %v", file, err) + return nil, nil, nil, nil, fmt.Errorf("could not create build package of %q: %v", file, err) } pkgPath := buildPkg.ImportPath @@ -65,7 +65,7 @@ func ParseAndTypeCheckFile(file string, flags ...string) (*ast.File, *token.File }, pkgPath) if err != nil { fmt.Println(err) - return nil, nil, nil, nil, fmt.Errorf("Could not load package of file %q: %v", file, err) + return nil, nil, nil, nil, fmt.Errorf("could not load package of file %q: %v", file, err) } pkgInfo := prog[0]