utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsoluteNum

func AbsoluteNum[T numeric](value T) T

func EnsureTime

func EnsureTime(value *time.Time, duration time.Duration) time.Time

func Hash

func Hash[T any](object T) (string, error)

func MaxSize

func MaxSize(toCut string, maxSize int) string

func ParseTimestamp

func ParseTimestamp(timestamp string) (t time.Time, err error)

func ShuffleString

func ShuffleString[T ~string](to T) T

Types

type KeyValueEntry

type KeyValueEntry[T any] struct {
	Key   string
	Value T
}

func (KeyValueEntry[T]) Compare

func (a KeyValueEntry[T]) Compare(b KeyValueEntry[T]) int

Jump to

Keyboard shortcuts

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