util

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(cond bool, msg string)

func Next

func Next(curr int64, cronExp string) (int64, error)

func OrderedRange

func OrderedRange[K cmp.Ordered, V any](m map[K]V) []V

func ParseCron

func ParseCron(cronExp string) (cron.Schedule, error)

func RemoveWhitespace added in v0.7.0

func RemoveWhitespace(s string) string

func SafeDeref

func SafeDeref[T any](val *T) T

func ToPointer

func ToPointer[T any](val T) *T

func UnmarshalChain added in v0.7.0

func UnmarshalChain(data []byte, vs ...any) error

Types

type KV

type KV[K any, V any] struct {
	Key   K
	Value V
}

func OrderedRangeKV

func OrderedRangeKV[K cmp.Ordered, V any](m map[K]V) []*KV[K, V]

Jump to

Keyboard shortcuts

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