checkers

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllCheckers = []Checker{
	BinCheck{"bin"},
	BinCheck{"node_modules/.bin"},
	BinCheck{".venv/bin"},
	DotEnvCheck{".envy"},
	GoPathCheck{},
	GitRootCheck{},
}

AllCheckers is a list of all Checker interfaces to use.

Functions

This section is empty.

Types

type BinCheck

type BinCheck struct {
	RelPath string
}

BinCheck checks for a directory with executables to add to the PATH.

func (BinCheck) Check

func (c BinCheck) Check(path string) (actions action.List)

Check implements the Checker interface.

type Checker

type Checker interface {
	Check(path string) action.List
}

Checker is the interface shared by functions that check for Actions to take for the given path.

type DotEnvCheck

type DotEnvCheck struct {
	RelPath string
}

DotEnvCheck checks for a .env file and loads the variables defined there

func (DotEnvCheck) Check

func (c DotEnvCheck) Check(path string) (actions action.List)

Check implements the Checker interface.

type GitRootCheck

type GitRootCheck struct{}

GitRootCheck checks if a path is the root of a git checkout.

func (GitRootCheck) Check

func (c GitRootCheck) Check(path string) (actions action.List)

Check implements the Checker interface.

type GoPathCheck

type GoPathCheck struct{}

GoPathCheck checks if a path is a GOPATH.

func (GoPathCheck) Check

func (c GoPathCheck) Check(path string) (actions action.List)

Check implements the Checker interface.

Jump to

Keyboard shortcuts

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