Documentation ¶
Index ¶
- func CapitalizeFirstLetter(s string) string
- func Contains[K comparable, V any](m map[K]V, key K) bool
- func FnMap[I, O any](fn func(I) O, s []I) []O
- func IsNil(val any) bool
- func JoinSurround(sep, surround string, elems ...string) string
- func MemoizedKeys[M ~map[string]V, V any](m *M) func() string
- func Pop[K comparable, V any](m map[K]V, key K) (val V, found bool)
- func SetAt[T any](slice []T, idx int, val T) []T
- func SliceToSet[K comparable](slice []K) map[K]struct{}
- func ToHclsyntaxBody(body hcl.Body) *hclsyntax.Body
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CapitalizeFirstLetter ¶
Proper unicode aware capitalization function. If something is wrong – just returns string as is.
func Contains ¶
func Contains[K comparable, V any](m map[K]V, key K) bool
func JoinSurround ¶
func MemoizedKeys ¶
func Pop ¶
func Pop[K comparable, V any](m map[K]V, key K) (val V, found bool)
If key in map - return corresponding value and delete it from map
func SetAt ¶ added in v0.4.1
Sets slice[idx] = val, growing the slice if needed, and returns the updated slice.
func SliceToSet ¶
func SliceToSet[K comparable](slice []K) map[K]struct{}
func ToHclsyntaxBody ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.