Documentation
¶
Index ¶
- func Exit(code int)
- func Stderr() *os.File
- func Stdin() *os.File
- func Stdout() *os.File
- func UserHomeDir() (string, error)
- func WithExitHandler(handler ExitHandler, fun func())
- func WithHomeDirHandler(handler HomeDirHandler, fun func() (string, error)) (string, error)
- func WithStderr(stderr *os.File, fun func())
- func WithStdin(stdin *os.File, fun func())
- func WithStdout(stdout *os.File, fun func())
- type ExitHandler
- type FileStreams
- type HomeDirHandler
- type IgnoreExitHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UserHomeDir ¶
func WithExitHandler ¶
func WithExitHandler(handler ExitHandler, fun func())
func WithHomeDirHandler ¶
func WithHomeDirHandler(handler HomeDirHandler, fun func() (string, error)) (string, error)
func WithStderr ¶
func WithStdout ¶
Types ¶
type FileStreams ¶
type FileStreams struct {
// contains filtered or unexported fields
}
type HomeDirHandler ¶
Handler for mocking os.UserHomeDir()
type IgnoreExitHandler ¶
type IgnoreExitHandler struct{}
func (IgnoreExitHandler) Handle ¶
func (h IgnoreExitHandler) Handle(code int)
Click to show internal directories.
Click to hide internal directories.