Documentation
¶
Index ¶
- func GetEnvVarNames() string
- type LocalSystem
- func (s *LocalSystem) Chdir(dir string) error
- func (s *LocalSystem) Command(name string, arg ...string) *exec.Cmd
- func (s *LocalSystem) Environ() []string
- func (s *LocalSystem) Exit(code int)
- func (s *LocalSystem) Getenv(key string) string
- func (s *LocalSystem) Getwd() (string, error)
- func (s *LocalSystem) Setenv(key string, value string)
- type System
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvVarNames ¶
func GetEnvVarNames() string
Types ¶
type LocalSystem ¶
type LocalSystem struct {
}
func NewLocalSystem ¶
func NewLocalSystem() *LocalSystem
func (*LocalSystem) Chdir ¶
func (s *LocalSystem) Chdir(dir string) error
func (*LocalSystem) Environ ¶
func (s *LocalSystem) Environ() []string
func (*LocalSystem) Exit ¶
func (s *LocalSystem) Exit(code int)
func (*LocalSystem) Getenv ¶
func (s *LocalSystem) Getenv(key string) string
func (*LocalSystem) Getwd ¶
func (s *LocalSystem) Getwd() (string, error)
func (*LocalSystem) Setenv ¶
func (s *LocalSystem) Setenv(key string, value string)
type System ¶
type System interface {
Command(name string, arg ...string) *exec.Cmd
Chdir(dir string) error
Getwd() (string, error)
Environ() []string
Getenv(string) string
Setenv(string, string)
Exit(int)
}
System represents the virtual operating system for the tool. It provides the system operations that can be mocked for testing.
Click to show internal directories.
Click to hide internal directories.