Documentation
¶
Index ¶
- func ContainsDigits(s string) bool
- func CopyStringFile(src string, dest string) (string, error)
- func EnsureDir(dir string) error
- func HSVToRGB(h, s, v float64) (int32, int32, int32)
- func IntersectionSlices[T constraints.Ordered](a, b []T) []T
- func MakeURLStringSlug(u string) string
- func MostOcc[T comparable](predictions []T) T
- func MustEnsureDir(dir string)
- func OnlyContainsDigits(s string) bool
- func ReadBytesFile(path string) ([]byte, error)
- func ReadStringFile(path string) (string, error)
- func ReverseSlice[T any](s []T)
- func RuneIsOneOf(r rune, rs []rune) bool
- func ShortenString(s string, l int) string
- func SliceEquals[T constraints.Ordered](a, b []T) bool
- func SortSlice[T constraints.Ordered](s []T)
- func TrimURLScheme(u string) string
- func WriteBytesFile(path string, content []byte) error
- func WriteJSONBytes(data any) ([]byte, error)
- func WriteJSONFile(path string, data any) error
- func WriteStringFile(path string, content string) error
- func WriteTempStringFile(path string, content string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsDigits ¶
func IntersectionSlices ¶
func IntersectionSlices[T constraints.Ordered](a, b []T) []T
func MakeURLStringSlug ¶ added in v0.5.39
func MostOcc ¶
func MostOcc[T comparable](predictions []T) T
func MustEnsureDir ¶ added in v0.5.39
func MustEnsureDir(dir string)
func OnlyContainsDigits ¶
func ReadBytesFile ¶ added in v0.5.39
ReadBytesFile returns the data at the given path declared in a "data" attribute of a BUILD.bazel rule.
func ReadStringFile ¶
ReadStringFile returns a string with the data at the given path declared in a "data" attribute of a BUILD.bazel rule.
func ReverseSlice ¶
func ReverseSlice[T any](s []T)
func RuneIsOneOf ¶
func ShortenString ¶
func SliceEquals ¶
func SliceEquals[T constraints.Ordered](a, b []T) bool
func SortSlice ¶
func SortSlice[T constraints.Ordered](s []T)
func TrimURLScheme ¶ added in v0.5.39
func WriteBytesFile ¶
WriteBytesFile writes the given file contents to the given path.
func WriteJSONBytes ¶ added in v0.5.39
WriteJSONString writes the given JSON to a string.
func WriteJSONFile ¶
WriteJSONFile writes the given file contents to the given path.
func WriteStringFile ¶
WriteStringFile writes the given file contents to the given path.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.