Documentation ¶ Index ¶ Variables func Visit(relpath string, visitFn func(f *os.File) error) error func VisitPaths(relath string, visitFn func(fp string) error) error Constants ¶ This section is empty. Variables ¶ View Source var ErrAbort = errors.New("abort visitation") ErrAbort can be returned from a visitation func to terminate iteration. Functions ¶ func Visit ¶ func Visit(relpath string, visitFn func(f *os.File) error) error Visit visits all searchpaths looking for extant files at relative path relpath, opening each file and calling visitFn on it (in searchpath order). The files are closed by Visit. If visitFn returns ErrAbort, Visit stops traversal and returns nil. func VisitPaths ¶ func VisitPaths(relath string, visitFn func(fp string) error) error VisitPaths is as Visit, but only passes the filepath to visitFn, without opening it. Types ¶ This section is empty. Source Files ¶ View all Source files searchpath.go Click to show internal directories. Click to hide internal directories.