Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NotFoundError = errors.New("not found")
Functions ¶
This section is empty.
Types ¶
type Codebase ¶
type Codebase interface { // FindFileMatching returns the path of the first file it finds matching a `glob` // and for which predicate returns true. // Note by go standard library doesn't understand globs with double asterisks, // like "/**/project.clj" FindFileMatching(predicate func(path string) bool, glob ...string) (path string, err error) // FindFile is like FindFileMatching, but with a constantly true predicate, so it always // returns the first file that matches glob FindFile(glob ...string) (path string, err error) ReadFile(path string) (contents []byte, err error) }
Codebase interface that allows finding files in a codebase and reading file contents
type LocalCodebase ¶
type LocalCodebase struct { BasePath string // contains filtered or unexported fields }
LocalCodebase is a Codebase for files available on local disk
func (LocalCodebase) FindFile ¶
func (c LocalCodebase) FindFile(glob ...string) (path string, err error)
func (LocalCodebase) FindFileMatching ¶
Click to show internal directories.
Click to hide internal directories.