shrink api

This commit is contained in:
Mark Bates 2019-08-01 12:06:50 -04:00
parent 930bae7f01
commit 95efea901d
2 changed files with 8 additions and 8 deletions

View File

@ -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)
}

View File

@ -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
}