Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultAmbassador = &ambassador{}
)
Functions ¶
This section is empty.
Types ¶
type Ambassador ¶
type Ambassador interface { Environ() []string LookPath(string) (string, error) RunCmd(cmd *exec.Cmd) ([]byte, error) TempFile(dir, pattern string) (File, error) Remove(name string) error }
Ambassador the ambassador to the outside "world". Wraps methods that modify global state and hence make the code that use them very hard to test.
type FakeFile ¶
type FakeFile struct {
// contains filtered or unexported fields
}
func NewFakeFile ¶
NewFakeFile constructs a new FakeFile with the given name and content.
type MockAmbassador ¶
func NewMockAmbassador ¶
func NewMockAmbassador() *MockAmbassador
func (*MockAmbassador) Environ ¶
func (m *MockAmbassador) Environ() []string
func (*MockAmbassador) Remove ¶
func (m *MockAmbassador) Remove(name string) error
Click to show internal directories.
Click to hide internal directories.