Documentation
¶
Index ¶
- func CloseWithLogging[T interface{ ... }](label string, closeable T)
- func HostOnly(endpoint string) string
- func Panicf(format string, args ...any)
- func ParseBinFile(binFile string) iter.Seq2[BinLine, error]
- func Ptr[T any](v T) *T
- func RandString(n int) string
- func RunGoroutine(ctx context.Context, fn func(ctx context.Context) error) (done chan error)
- func Sleep(ctx context.Context, duration time.Duration) error
- func SortedKeys[T any](m map[string]T) []string
- type BinLine
- type SyncMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseWithLogging ¶
func RandString ¶
RandString returns a base64 encoded string of n bytes.
func RunGoroutine ¶
RunGoroutine runs a goroutine that can be cancelled using ctx. It returns a channel that is closed when the goroutine exits, and will contain an error if one occurred that was not a cancellation error (context.DeadlineExceeded or context.Canceled).
func SortedKeys ¶
Types ¶
type SyncMap ¶
type SyncMap[KeyT comparable, ValueT any] struct { // contains filtered or unexported fields }
SyncMap is a sync.Map, just with typesafe wrapper functions.
Click to show internal directories.
Click to hide internal directories.