std

package
v4.2.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package std provides tools for standard types (strings, int, floats, etc).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneMap added in v4.0.4

func CloneMap[M ~map[K]V, K comparable, V any](m M) M

CloneMap returns a copy of m. This is a shallow clone: the new keys and values are set using ordinary assignment.

func ParseCellsDuration

func ParseCellsDuration(s string) (time.Duration, error)

ParseCellsDuration wraps standard time.ParseDuration supporting the "d" unit (as day)

func Randkey

func Randkey(n int) string

Randkey produces a random string with a given length

func Retry

func Retry(ctx context.Context, f func() error, seconds ...time.Duration) error

Retry function

Types

This section is empty.

Jump to

Keyboard shortcuts

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