package
Version:
v1.0.0-beta.110
Opens a new window with list of versions in this module.
Published: Jun 1, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
CE is a helper to shortcut error creation and logging
Used like this:
return CE("msg, value %v", value)
to replace:
err := fmt.Errorf("msg, value %v", value)
log.Msgf("msg, value %v", value)
return err.
Configure default logger.
E is a helper function to shortcut condition checking and logging
in the case of error
Used like this:
if E(err) {
return err
}
to replace:
if err != nil {
log.Msgf(err.Error())
return err
}
type LogConfig struct {
Level string
Format string
SampleRate float64 `mapstructure:"sample_rate" yaml:"sample_rate" json:"sample_rate"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.