Documentation ¶
Index ¶
- Variables
- func BindFlags(cmd *cobra.Command, o *zap.Options)
- func Init(cmd *cobra.Command, configPath *string)
- func JSONEncoderConfig() zapcore.EncoderConfig
- func LookupEnvOrBool(key string, defaultVal bool) bool
- func LookupEnvOrString(key string, defaultVal string) string
- func TextEncoderConfig() zapcore.EncoderConfig
- func UsageFor(short string) func()
- type LevelFlag
- type OutputFormatFlag
Constants ¶
This section is empty.
Variables ¶
View Source
var CallerSkip = 0
CallerSkip increases the number of callers skipped by caller annotation
Functions ¶
func JSONEncoderConfig ¶ added in v0.8.0
func JSONEncoderConfig() zapcore.EncoderConfig
JSONEncoderConfig returns an opinionated EncoderConfig
func LookupEnvOrBool ¶
LookupEnvOrBool adds the capability to get env instead of param flag
func LookupEnvOrString ¶
LookupEnvOrString adds the capability to get env instead of param flag
func TextEncoderConfig ¶
func TextEncoderConfig() zapcore.EncoderConfig
TextEncoderConfig returns an opinionated EncoderConfig
Types ¶
type OutputFormatFlag ¶
OutputFormatFlag contains structure for managing zap encoding
func (*OutputFormatFlag) Set ¶
func (o *OutputFormatFlag) Set(flagValue string) error
Set flag output format value
func (*OutputFormatFlag) String ¶
func (o *OutputFormatFlag) String() string
String returns the output format flag value
func (*OutputFormatFlag) Type ¶
func (o *OutputFormatFlag) Type() string
Type returns the output format flag type
Click to show internal directories.
Click to hide internal directories.