diff --git a/parser/file.go b/parser/file.go index 8b6a2d8..9ea2bd5 100644 --- a/parser/file.go +++ b/parser/file.go @@ -10,15 +10,15 @@ import ( "github.com/markbates/errx" ) -type ParsedFile struct { +type parsedFile struct { File string FileSet *token.FileSet Ast *ast.File } -// ParseFileMode ... -func ParseFileMode(f string, mode parser.Mode) (ParsedFile, error) { - pf := ParsedFile{ +// parseFileMode ... +func parseFileMode(f string, mode parser.Mode) (parsedFile, error) { + pf := parsedFile{ File: f, FileSet: token.NewFileSet(), } @@ -38,7 +38,7 @@ func ParseFileMode(f string, mode parser.Mode) (ParsedFile, error) { return pf, nil } -// ParseFile ... -func ParseFile(f string) (ParsedFile, error) { - return ParseFileMode(f, 0) +// parseFile ... +func parseFile(f string) (parsedFile, error) { + return parseFileMode(f, 0) } diff --git a/parser/visitor.go b/parser/visitor.go index 4250355..0767465 100644 --- a/parser/visitor.go +++ b/parser/visitor.go @@ -22,7 +22,7 @@ func NewVisitor(p string) (*Visitor, error) { } func (v *Visitor) Run() ([]paths.Path, error) { - pf, err := ParseFile(v.File) + pf, err := parseFile(v.File) if err != nil { return nil, err }