util

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapMany

func MapMany[T any, R any](x []T, m func(e T) R) []R

func RandomStringFromAlphabet

func RandomStringFromAlphabet(alphabet string, length int) string

Types

type Cache

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

func NewCache

func NewCache() *Cache

func (*Cache) Get

func (c *Cache) Get(key string) (any, bool)

func (*Cache) SetTTL

func (c *Cache) SetTTL(key string, value any, ttl time.Duration)

type CacheEntry

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

Jump to

Keyboard shortcuts

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