util

package
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindFlags

func BindFlags(o *zap.Options, fs *flag.FlagSet)

BindFlags custom flags

func JsonEncoderConfig

func JsonEncoderConfig() zapcore.EncoderConfig

JsonEncoderConfig returns an opinionated EncoderConfig

func RemoveIndex

func RemoveIndex(s []string, index int) []string

RemoveIndex takes a slice or an array and remove the element designated by the index

func TextEncoderConfig

func TextEncoderConfig() zapcore.EncoderConfig

TextEncoderConfig returns an opinionated EncoderConfig

func UnixMilli added in v0.1.1

func UnixMilli(t *metav1.Time) int64

UnixMilli returns Unix time in millisecond

Types

type ConfigFlag

type ConfigFlag struct {
	// contains filtered or unexported fields
}

func (ConfigFlag) Set

func (f ConfigFlag) Set(flagValue string) error

func (ConfigFlag) String

func (f ConfigFlag) String() string

type LevelFlag

type LevelFlag struct {
	ZapOptions *zap.Options
	// contains filtered or unexported fields
}

LevelFlag contains structure for managing zap level

func (LevelFlag) Set

func (l LevelFlag) Set(flagValue string) error

func (LevelFlag) String

func (l LevelFlag) String() string

type OutputFormatFlag

type OutputFormatFlag struct {
	ZapOptions *zap.Options
	// contains filtered or unexported fields
}

OutputFormatFlag contains structure for managing zap encoding

func (*OutputFormatFlag) Set

func (o *OutputFormatFlag) Set(flagValue string) error

func (*OutputFormatFlag) String

func (o *OutputFormatFlag) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL