Skip to content

Commit 14013e6

Browse files
committed
chore: un-export functions
1 parent 8ebdf52 commit 14013e6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

pkg/goanalysis/pkgerrors/errors.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func BuildIssuesFromIllTypedError(errs []error, lintCtx *linter.Context) ([]resu
3535
continue
3636
}
3737

38-
for _, err := range ExtractErrors(ill.Pkg) {
38+
for _, err := range extractErrors(ill.Pkg) {
3939
i, perr := parseError(err)
4040
if perr != nil { // failed to parse
4141
if uniqReportedIssues[err.Msg] {
@@ -58,7 +58,7 @@ func BuildIssuesFromIllTypedError(errs []error, lintCtx *linter.Context) ([]resu
5858
}
5959

6060
func parseError(srcErr packages.Error) (*result.Issue, error) {
61-
pos, err := ParseErrorPosition(srcErr.Pos)
61+
pos, err := parseErrorPosition(srcErr.Pos)
6262
if err != nil {
6363
return nil, err
6464
}

pkg/goanalysis/pkgerrors/extract.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
// ex: `/example/main.go:11:17: foobar`
1313
var reFile = regexp.MustCompile(`^.+\.go:\d+:\d+: .+`)
1414

15-
func ExtractErrors(pkg *packages.Package) []packages.Error {
15+
func extractErrors(pkg *packages.Package) []packages.Error {
1616
errors := extractErrorsImpl(pkg, map[*packages.Package]bool{})
1717
if len(errors) == 0 {
1818
return errors
@@ -38,7 +38,7 @@ func ExtractErrors(pkg *packages.Package) []packages.Error {
3838
if len(pkg.GoFiles) != 0 {
3939
// errors were extracted from deps and have at least one file in package
4040
for i := range uniqErrors {
41-
if _, parseErr := ParseErrorPosition(uniqErrors[i].Pos); parseErr == nil {
41+
if _, parseErr := parseErrorPosition(uniqErrors[i].Pos); parseErr == nil {
4242
continue
4343
}
4444

pkg/goanalysis/pkgerrors/parse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"strings"
99
)
1010

11-
func ParseErrorPosition(pos string) (*token.Position, error) {
11+
func parseErrorPosition(pos string) (*token.Position, error) {
1212
// file:line(<optional>:colon)
1313
parts := strings.Split(pos, ":")
1414
if len(parts) == 1 {

0 commit comments

Comments
 (0)