Documentation
¶
Overview ¶
Package xmain provides a standard stub for the main of a command handling logging, flags, signals and shutdown.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiscardSlog ¶
TODO: remove after removing slog
Types ¶
type ExitError ¶
func ExitErrorf ¶
type State ¶
type State struct {
Name string
Stdin io.Reader
Stdout io.WriteCloser
Stderr io.WriteCloser
Log *cmdlog.Logger
Env *xos.Env
Args []string
FlagSet *pflag.FlagSet
}
type UsageError ¶
type UsageError struct {
Message string `json:"message"`
}
func UsageErrorf ¶
func UsageErrorf(msg string, v ...interface{}) UsageError
func (UsageError) Error ¶
func (ue UsageError) Error() string
Click to show internal directories.
Click to hide internal directories.