Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildDate time.Time // Set by main
View Source
var DevMode = false // Whether running in development mode
View Source
var LogFile string // Set by mainc
View Source
var Plain bool // Enable console color output
View Source
var TransqlateVersion string // Set by main
View Source
var TtyOut = false // Whether stdout is a terminal
View Source
var Version string // Set by main
Functions ¶
func Errorf ¶
Errorf creates a cmd error
Default exit code is 1. Use WithCode(x) to change exit code. You cant wrap an error.
func Exit ¶ added in v0.0.12
Exit returns an anonymous exiting error
Use it to stop program after --version or --help. Using cmd.Exit() rather than os.Exit() ensures all deferred functions are executed.
func Koanf ¶ added in v0.0.12
Koanf loads flags and environment variables into a koanf instance.
Set defaults in flags.
Types ¶
type UsageError ¶ added in v1.0.0
type UsageError struct {
// contains filtered or unexported fields
}
func (UsageError) Error ¶ added in v1.0.0
func (u UsageError) Error() string
func (UsageError) Unwrap ¶ added in v1.0.0
func (u UsageError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.