Documentation
¶
Overview ¶
Package libpreston provides the core functionality for the Preston CLI binary, and is the main entry point into all functionality. It provides various scanners and methods to verify the conformance of a given package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TreeFunc ¶
type TreeFunc func(path string)
TreeFunc is a simple callback type which takes a full path as a string to check and read.
type TreeScanner ¶
type TreeScanner struct {
BaseDir string // Base directory to actually scan
// contains filtered or unexported fields
}
TreeScanner is used to scan a source tree and do useful Things with said tree. Predominantly this is used for scanning and discovering licenses within the tree.
func NewTreeScanner ¶
func NewTreeScanner(basedir string) (*TreeScanner, error)
NewTreeScanner will return a scanner for the given directory
func (*TreeScanner) AddCallback ¶
func (t *TreeScanner) AddCallback(pattern string, callback TreeFunc)
AddCallback will register a callback for the given pattern. Note that all callbacks are lower-case.
func (*TreeScanner) Scan ¶
func (t *TreeScanner) Scan() error
Scan will do the grunt work of actually _scanning_ the tree
Source Files
¶
- main.go