Documentation ¶
Index ¶
- func CloseOrLogError(ctx context.Context) func(io.Closer)
- func ConvertToStringSlice(interfaceSlice []interface{}) []string
- func GetAnyBoolEnv(ks ...string) bool
- func GetAnyIntEnv(ks ...string) int
- func GetAnyStringEnv(ks ...string) string
- func MapResourceList(resourceList []interface{}, attrName string) map[string]interface{}
- func OrderedListFromMap(inputMap map[string]interface{}) []interface{}
- func OrderedListFromMapByKeyValues(inputMap map[string]interface{}, keyList []string) []interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseOrLogError ¶
CloseOrLogError closes the given io.Closer and logs any error.
func ConvertToStringSlice ¶ added in v0.46.5
func ConvertToStringSlice(interfaceSlice []interface{}) []string
ConvertToStringSlice helps convert interface slice to string slice.
func GetAnyBoolEnv ¶ added in v0.22.0
GetAnyBoolEnv returns the first non-empty boolean value from the environment variables.
func GetAnyIntEnv ¶ added in v0.52.0
GetAnyIntEnv returns the first non-empty integer value from the environment variables.
func GetAnyStringEnv ¶ added in v0.22.0
GetAnyStringEnv returns the first non-empty string value from the environment variables.
func MapResourceList ¶ added in v0.52.0
MapResourceList generates a list of strings from a Terraform resource list (list of maps). The list is generated from the value of the specified attribute.
"Map" in this context is a functional programming term, not a Go map. "Resource" in this context is a Terraform resource, i.e. a map of attributes.
func OrderedListFromMap ¶ added in v0.47.0
func OrderedListFromMap(inputMap map[string]interface{}) []interface{}
OrderedListFromMap generates a list from a map's values. The values are sorted based on the map's keys.
func OrderedListFromMapByKeyValues ¶ added in v0.52.0
OrderedListFromMapByKeyValues generates a list from a map's values. The values are sorted based on the provided key list. If a key is not found in the map, it is skipped.
Types ¶
This section is empty.