libpreston

package
v0.0.0-...-c846e05 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

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

Directories

Path Synopsis
Package source provides methods for dealing with source package specs
Package source provides methods for dealing with source package specs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL