Documentation
¶
Index ¶
- func GetEnvWithDefault(key, defaultValue string) string
- func GetEnvWithDefaultNP(key, defaultValue string, nonEmpty bool) string
- func PanicIfError(err error)
- type SimpleTaggedLog
- func (l SimpleTaggedLog) Debugf(format string, args ...interface{})
- func (l SimpleTaggedLog) Errorf(format string, args ...interface{})
- func (l SimpleTaggedLog) Infof(format string, args ...interface{})
- func (l SimpleTaggedLog) PanicIfError(err error)
- func (l SimpleTaggedLog) Panicf(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvWithDefault ¶
GetEnvWithDefault returns the value of the environment variable named by the key. It is guaranteed to return the default value if the environment variable is not found or is empty.
func GetEnvWithDefaultNP ¶
GetEnvWithDefaultNP returns the value of the environment variable named by the key. It is guaranteed to return the default value if the environment variable is not found. If the environment variable is found, it is guaranteed to return the default value if the environment variable is empty.
func PanicIfError ¶ added in v0.0.2
func PanicIfError(err error)
PanicIfError panics if the error is not nil.
Types ¶
type SimpleTaggedLog ¶ added in v0.0.2
type SimpleTaggedLog struct {
Debug bool
// contains filtered or unexported fields
}
func NewDebugLogger ¶ added in v0.0.2
func NewDebugLogger() SimpleTaggedLog
func NewLogger ¶ added in v0.0.2
func NewLogger() SimpleTaggedLog
func WrapLogger ¶ added in v0.0.2
func WrapLogger(logger *lg.Logger, debug bool) SimpleTaggedLog
func (SimpleTaggedLog) Debugf ¶ added in v0.0.2
func (l SimpleTaggedLog) Debugf(format string, args ...interface{})
func (SimpleTaggedLog) Errorf ¶ added in v0.0.2
func (l SimpleTaggedLog) Errorf(format string, args ...interface{})
func (SimpleTaggedLog) Infof ¶ added in v0.0.2
func (l SimpleTaggedLog) Infof(format string, args ...interface{})
func (SimpleTaggedLog) PanicIfError ¶ added in v0.0.2
func (l SimpleTaggedLog) PanicIfError(err error)
func (SimpleTaggedLog) Panicf ¶ added in v0.0.2
func (l SimpleTaggedLog) Panicf(format string, args ...interface{})
Click to show internal directories.
Click to hide internal directories.