Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrFileNotFound = errors.New("could not detect file")
Returned when the .gopath file is not found.
var GiloBinary = BinaryResolverFunc(giloBinary)
GiloBinary - Returns the directory of the gilo binary. Checks the GILOBIN environment variable for a user specified value. Otherwise defaults to $HOME/.gilo/bin
Functions ¶
func MustWorkingDirectory ¶
func MustWorkingDirectory() string
MustWorkingDirectory - returns the current working directory. or panics.
Types ¶
type BinaryResolver ¶
BinaryResolver - Used to find the paths to a binary
type BinaryResolverFunc ¶
BinaryResolverFunc - adapter function allowing pure functions to act as a BinaryResolver
func (BinaryResolverFunc) Path ¶
func (t BinaryResolverFunc) Path() (string, error)
Path - Returns path computed by the function.
type ConstantResolver ¶
type ConstantResolver string
ConstantResolver - This resolver is for test cases.
type ErroringResolver ¶
type ErroringResolver struct {
Err error
}
ErroringResolver - This resolver is for test cases.
type FileResolver ¶
FileResolver - Interface for resolving configuration file
type PathMunger ¶
type PathMunger interface { Strip(path string) string Replace(pattern string, replacement string) string Prepend(path string) string }
PathMunger - Utility methods for manipulating os paths.
type RecursiveResolver ¶
type RecursiveResolver struct {
Directory string
}
RecursiveResolver - FileResolver that recurses up the directory tree.
type UnixPathMunger ¶
type UnixPathMunger string
UnixPathMunger - Unix implementation of the path munger.
func (UnixPathMunger) Prepend ¶
func (t UnixPathMunger) Prepend(path string) string
Prepend - Prepends the specified path to the Path Munger
func (UnixPathMunger) Replace ¶
func (t UnixPathMunger) Replace(pattern string, replacement string, n int) string
Replace - replaces the supplied pattern with replacement string within the path up to n times.
func (UnixPathMunger) Strip ¶
func (t UnixPathMunger) Strip(subpath string) string
Strip - Strips the specified subpath from the path.