Documentation ¶
Index ¶
- func AbnormalExit(backupFinished bool, msg string, options ...ExitOption)
- func AbnormalExitIf(err error, backupFinished bool, options ...ExitOption)
- func Error(msg string)
- func ErrorExitIf(fail bool, backupFinished bool, msg string)
- func Exit(msg string, options ...ExitOption)
- func ExitIf(err error, options ...ExitOption)
- func ExitWithOption(opts ...ExitOption)
- func NormalExit(msg string, options ...ExitOption)
- func NormalExitIf(success bool, msg string, options ...ExitOption)
- func Success(msg string)
- func Warning(msg string)
- type ErrorCode
- type ExitOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbnormalExit ¶
func AbnormalExit(backupFinished bool, msg string, options ...ExitOption)
func AbnormalExitIf ¶
func AbnormalExitIf(err error, backupFinished bool, options ...ExitOption)
func ErrorExitIf ¶
func Exit ¶
func Exit(msg string, options ...ExitOption)
func ExitIf ¶
func ExitIf(err error, options ...ExitOption)
func ExitWithOption ¶
func ExitWithOption(opts ...ExitOption)
func NormalExit ¶
func NormalExit(msg string, options ...ExitOption)
func NormalExitIf ¶
func NormalExitIf(success bool, msg string, options ...ExitOption)
Types ¶
type ExitOption ¶
type ExitOption func(c *exitConfig)
func AddCallbacks ¶
func AddCallbacks(fns ...func()) ExitOption
func WithAbnormalExit ¶
func WithAbnormalExit() ExitOption
func WithExitCode ¶
func WithExitCode(code ErrorCode) ExitOption
func WithMsg ¶
func WithMsg(msg string) ExitOption
Click to show internal directories.
Click to hide internal directories.