func (fd *finder) findAllGoFiles(dir string) ([]string, error) {
	var err error
	var names []string
	oncer.Do(fd.key("findAllGoFiles", dir), func() {
		plog.Debug(fd, "findAllGoFiles", "dir", dir)
		callback := func(path string, do *godirwalk.Dirent) error {
			ext := filepath.Ext(path)
			if ext != ".go" {
				return nil
			}
			fi, err := os.Stat(path)
			if err != nil {
				return nil
			}
			if fi.IsDir() {
				return nil
			}
			names = append(names, path)
			return nil
		}
		err = godirwalk.Walk(dir, &godirwalk.Options{
			FollowSymbolicLinks: true,
			Callback:            callback,
		})
	})
	return names, err
}
findAllGoFiles *.go files for a given diretory
package parser
import (
	"fmt"
	"go/build"
	"os"
	"path/filepath"
	"strings"
	"time"
	"github.com/gobuffalo/packr/v2/plog"
	"github.com/karrick/godirwalk"
	"github.com/markbates/errx"
	"github.com/markbates/oncer"
)
type finder struct {
	id time.Time
}
func (fd *finder) key(m, dir string) string {
	return fmt.Sprintf("%s-*parser.finder#%s-%s", fd.id, m, dir)
}