util

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CeilToPower2 added in v0.2.0

func CeilToPower2(num uint32) uint32

func IsObjectNil

func IsObjectNil(obj interface{}) bool

func MustClose

func MustClose(obj io.Closer)

func SetLogger

func SetLogger(lg *zap.Logger)

Types

type Corrector

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

func NewCorrector

func NewCorrector(intMin int64, floatMin float64) *Corrector

func (*Corrector) Float64

func (c *Corrector) Float64(v *float64, def float64)

func (*Corrector) Int

func (c *Corrector) Int(v *int, def int)

func (*Corrector) String

func (c *Corrector) String(v *string, def string)

func (*Corrector) TomlDuration

func (c *Corrector) TomlDuration(v *toml.Duration, def toml.Duration)

func (*Corrector) TomlSize

func (c *Corrector) TomlSize(v *toml.Size, def toml.Size)

func (*Corrector) Uint64

func (c *Corrector) Uint64(v *uint64, def uint64)

Jump to

Keyboard shortcuts

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