Documentation
¶
Index ¶
- Variables
- func Close(closer io.Closer, onErrorMessage string)
- func Errorf(msg string, args ...interface{}) error
- func FatalOnError(err error, reason string, args ...interface{})
- func GetEnvironment() string
- func IsDevelopment() bool
- func IsProduction() bool
- func IsStaging() bool
- func IsTesting() bool
- func OpenWriter(name string) (*os.File, error)
- func PanicOnError(err error, msg string, args ...interface{})
- func Panicf(msg string, args ...interface{})
- type BaseOptions
- type LazyHandler
- type StartupError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BuildPackage string BuildGitHash string BuildVersion string BuildUnixTimestamp string )
View Source
var LogLevel slog.LevelVar
Functions ¶
func FatalOnError ¶
func GetEnvironment ¶ added in v2.3.56
func GetEnvironment() string
func IsDevelopment ¶ added in v2.3.55
func IsDevelopment() bool
func IsProduction ¶ added in v2.3.55
func IsProduction() bool
func PanicOnError ¶
Types ¶
type BaseOptions ¶
type BaseOptions struct { Logfile string `long:"log-file" description:"Write logs to a different file. Defaults to stdout."` ForceColor bool `long:"log-color" description:"Forces colored output even on non TTYs."` JSONFormatter bool `long:"log-json" description:"Log using the logrus json formatter."` Verbose bool `long:"verbose" description:"Show verbose logging output."` Version bool `long:"version" description:"Prints the build information about this application if available."` Environment string `long:"environment" description:"The environment this application is running in."` }
func (*BaseOptions) Initialize ¶
func (opts *BaseOptions) Initialize()
type LazyHandler ¶ added in v2.3.0
type StartupError ¶
type StartupError error
Click to show internal directories.
Click to hide internal directories.