Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Environment interface { // Setenv changes the environment variable k to value v. Setenv(k, v string) error // Unsetenv deletes the environment variable k. Unsetenv(k string) error // ExpandEnv replaces $VAR and ${VAR} in string s with values from the environment. ExpandEnv(s string) string // Getenv gets an environment variable from the environment. Getenv(k string) string }
Environment provides methods for reading a file or writing to a file.
type FileReaderWriter ¶
type FileReaderWriter interface { ReadFile(filename string) ([]byte, error) WriteFile(filename string, data []byte, perm os.FileMode) error Reader(filename string) (io.ReadCloser, error) Writer(filename string, perm os.FileMode) (io.WriteCloser, error) MkdirAll(path string, perm os.FileMode) error Symlink(oldname, newname string) error RemoveAll(path string) error }
FileReaderWriter provides methods for reading a file or writing to a file.
func NewFileReaderWriter ¶
func NewFileReaderWriter() FileReaderWriter
NewFileReaderWriter returns a new FileReaderWriter.
Click to show internal directories.
Click to hide internal directories.