utils

package
v0.0.0-...-e3f83c9 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlphanumericOnly

func AlphanumericOnly(s string) string

func CloneJSON

func CloneJSON[T any](t1 T) (T, error)

func CloneXML

func CloneXML[T any](t1 T) (T, error)

func MemoizeOperation

func MemoizeOperation(fileName string, fn func() ([]byte, error)) ([]byte, error)

func ProjectRoot

func ProjectRoot() string

func Shuffle

func Shuffle[T any](ts []T)

func SplitIntoBatches

func SplitIntoBatches[T any](ts []T, n int) [][]T

func WriteBytesToTempFile

func WriteBytesToTempFile(data []byte, filePathFmt string) (filename string, err error)

func WriteErrorsToTempFile

func WriteErrorsToTempFile(value []error, prefix string) (filename string, err error)

func WriteValueToTempJSONFile

func WriteValueToTempJSONFile(value any, prefix string) (filename string, err error)

func WriteValueToTempXMLFile

func WriteValueToTempXMLFile(value any, prefix string) (filename string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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