Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Arguments []string // Command Line arguments Environment []string // OS Environment Variables Context context.Context // Application context Stdin io.Reader // fd0 /dev/stdin Stdout io.Writer // fd1 /dev/stdout Stderr io.Writer // fd2 /dev/stderr ExitHandler func(int) // handler for calls to os.Exit // contains filtered or unexported fields }
App represents a core application instance. Values can be mocked for testing.
func New ¶
func New() *App
New returns a new App instance. The values are take directly from the environment. Manually construct an App instance in order to mock these values.
func (*App) Exit ¶
Exit calls the app ExitHandler. If no ExitHandler is set, calls os.Exit. This method properly shuts down the app logger if it has been initialized.
func (*App) HandleError ¶
HandleError sends the supplied error via the Errors channel. The channel is closed after sending.
Click to show internal directories.
Click to hide internal directories.