Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Env ¶
type Env interface { // Get gets the environment variable of the given name. Get(name string) string }
Env is an interface to a set of environment variables.
type FS ¶
type FS interface { // ReadAll gets the contents of filename, or an error if the file didn't exist or there was an // error reading it. ReadFile(filename string) ([]byte, error) // RemoveAll removes all of the files under the directory at name. It behaves similarly to the // func of the same name in the os package (https://godoc.org/os#RemoveAll). RemoveAll(name string) error }
FS is the interface to a file system.
type FakeEnv ¶
type FakeEnv struct { // Envs is the map from which Get calls will look to retrieve environment variables. Envs map[string]string }
FakeEnv is an Env implementation that stores the environment in a map.
func NewFakeEnv ¶
func NewFakeEnv() *FakeEnv
NewFakeEnv returns a new FakeEnv with no values in Envs.
type FakeFS ¶
FakeFS is an in-memory FS implementation.
type FakeFileNotFound ¶
type FakeFileNotFound struct {
Filename string
}
FakeFileNotFound is the error returned by FakeFS when a requested file isn't found.
func (FakeFileNotFound) Error ¶
func (f FakeFileNotFound) Error() string
Error is the error interface implementation.
Click to show internal directories.
Click to hide internal directories.