util

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandomInt added in v0.8.0

func RandomInt(min, max int) int

RandomInt returns a random integer min <= n < max.

func UpdateConfig

func UpdateConfig(configPath string, update func(*latestconfig.Config) (*latestconfig.Config, error)) error

UpdateConfig performs an atomic update on the given config file.

Types

type LevelFlag

type LevelFlag slog.Level

LevelFlag is a urfave/cli compatible flag for setting the log verbosity level.

func FromSlogLevel

func FromSlogLevel(l slog.Level) *LevelFlag

func (*LevelFlag) Set

func (f *LevelFlag) Set(value string) error

func (*LevelFlag) String

func (f *LevelFlag) String() string

Jump to

Keyboard shortcuts

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