Documentation
¶
Index ¶
- func AllCrossed[Slice ~[]E, E comparable](s Slice) iter.Seq2[E, int]
- func CompareByMap[E cmp.Ordered](m map[E]int, fallbackCompare func(a, b E) int) func(a, b E) int
- func CopyGenericMaps[T any](target map[string]T, source map[string]T)
- func CopyMaps(target map[string]schema.Attribute, source map[string]schema.Attribute)
- func GenID() string
- func GoObjectToTerraformString(v interface{}, jsonEscapeHTML bool) (types.String, error)
- func InterfaceToStringArray(o interface{}) []string
- func IsDone(ctx context.Context) bool
- func Map[S, R any](items []S, fn func(S) R) []R
- func PtrTo[T any](v T) *T
- func SimpleCompare[E cmp.Ordered](a, b E) int
- func SortSliceByOther[Slice ~[]E, E cmp.Ordered](slice, other Slice, fallbackCompare func(a, b E) int) Slice
- func SortStringSliceByOther(slice, other []string) []string
- func TFStringListToStringArray(list []types.String) []string
- func TerraformJsonStringToGoObject(v *string) (*map[string]any, error)
- func TerraformListToGoArray(ctx context.Context, list types.List, arrayType string) ([]interface{}, error)
- func TerraformStringToBooleanOrString(s types.String) interface{}
- func TerraformStringToGoType[T any](s types.String) (T, error)
- type StringErr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllCrossed ¶ added in v2.7.0
func AllCrossed[Slice ~[]E, E comparable](s Slice) iter.Seq2[E, int]
func CompareByMap ¶ added in v2.7.0
func CopyGenericMaps ¶
func InterfaceToStringArray ¶
func InterfaceToStringArray(o interface{}) []string
func SimpleCompare ¶ added in v2.7.0
func SortSliceByOther ¶ added in v2.7.0
func SortSliceByOther[Slice ~[]E, E cmp.Ordered](slice, other Slice, fallbackCompare func(a, b E) int) Slice
SortSliceByOther sorts `slice` by the positioning of equal items that exist in the `other` slice.
You can also provide `fallbackCompare` to be used if both items don't exist in the `other` slice. If only a single item is missing from the `other` slice, it will do a simple compare (a > b / a < b / a == b).
func SortStringSliceByOther ¶ added in v2.7.0
func TerraformListToGoArray ¶
func TerraformStringToBooleanOrString ¶ added in v2.0.16
Types ¶
Click to show internal directories.
Click to hide internal directories.