Documentation ¶
Index ¶
- Variables
- func AppendFront[T any](el T, arr []T) []T
- func Bool2Int(b bool) int
- func Cached1In1Out[I comparable, O any](f func(I) O) func(I) O
- func Cached1In1OutErr[I comparable, O1 any](f func(I) (O1, error)) func(I) (O1, error)
- func Cached1In2Out[I comparable, O1 any, O2 any](f func(I) (O1, O2)) func(I) (O1, O2)
- func Cached1In2OutErr[I comparable, O1 any, O2 any](f func(I) (O1, O2, error)) func(I) (O1, O2, error)
- func Cached2In1OutErr[I1 comparable, I2 comparable, O1 any](f func(I1, I2) (O1, error)) func(I1, I2) (O1, error)
- func Clamp(min int, n, max int) int
- func EndsWith(string string, substrings []string) bool
- func ExecuteWithTimeout[T any](timeout time.Duration, f func() (T, error)) (T, error)
- func GlobstarMatch(pattern string, check string) (bool, error)
- func GoldenTest(t *testing.T, file string, content string)
- func InArray[T comparable](value T, array []T) bool
- func ItoAArr(arr []int) string
- func ItoAArr2(arr [2]int) string
- func MakeCachedFindClosestDirWithRootFile(rootFiles []string) func(string) *SourcesRoot
- func Max[T any](arr []T, f func(T) int) int
- func Merge[T any](acc map[string]T, maps ...map[string]T) map[string]T
- func PrefixN(str string, char rune) int
- func Scale(n float64, lo float64, hi float64, tlo float64, thi float64) float64
- func UnquoteSafe(types ...string) participle.Option
- type CallStack
- type Set
- type SourcesRoot
- type Vector
Constants ¶
This section is empty.
Variables ¶
View Source
var DirExists = Cached1In1Out(_DirExists)
View Source
var FileExists = Cached1In1Out(_FileExists)
Functions ¶
func AppendFront ¶ added in v0.19.2
func AppendFront[T any](el T, arr []T) []T
func Cached1In1Out ¶ added in v0.17.4
func Cached1In1Out[I comparable, O any](f func(I) O) func(I) O
func Cached1In1OutErr ¶ added in v0.17.4
func Cached1In1OutErr[I comparable, O1 any](f func(I) (O1, error)) func(I) (O1, error)
func Cached1In2Out ¶ added in v0.17.7
func Cached1In2Out[I comparable, O1 any, O2 any](f func(I) (O1, O2)) func(I) (O1, O2)
func Cached1In2OutErr ¶ added in v0.17.4
func Cached1In2OutErr[I comparable, O1 any, O2 any](f func(I) (O1, O2, error)) func(I) (O1, O2, error)
func Cached2In1OutErr ¶ added in v0.17.4
func Cached2In1OutErr[I1 comparable, I2 comparable, O1 any](f func(I1, I2) (O1, error)) func(I1, I2) (O1, error)
func ExecuteWithTimeout ¶ added in v0.22.4
func GlobstarMatch ¶ added in v0.17.4
func InArray ¶
func InArray[T comparable](value T, array []T) bool
func MakeCachedFindClosestDirWithRootFile ¶ added in v0.20.0
func MakeCachedFindClosestDirWithRootFile(rootFiles []string) func(string) *SourcesRoot
func UnquoteSafe ¶ added in v0.17.4
func UnquoteSafe(types ...string) participle.Option
UnquoteSafe applies strconv.Unquote() to tokens of the given types.
Tokens of type "String" will be unquoted if no other types are provided.
Types ¶
type CallStack ¶ added in v0.17.4
type CallStack struct {
// contains filtered or unexported fields
}
func NewCallStack ¶ added in v0.17.4
func NewCallStack() *CallStack
type Set ¶ added in v0.21.0
type Set[T comparable] map[T]struct{}
func SetFromSlice ¶ added in v0.21.0
func SetFromSlice[T comparable](arr []T) Set[T]
type SourcesRoot ¶ added in v0.20.0
Click to show internal directories.
Click to hide internal directories.