utils

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolPtr added in v1.1.0

func BoolPtr(input bool) *bool

BoolPtr converts a bool to a bool pointer

func Int64Ptr added in v1.1.0

func Int64Ptr(input int64) *int64

Int64Ptr converts an int64 to a int64 pointer

func IsBlank

func IsBlank(input string) bool

IsBlank returns true when the provided string is empty or only contains whitespace characters

func RandomString

func RandomString(length int) string

RandomString creates a random string of the given length

func RemoveNewLinesAndTabs added in v1.5.0

func RemoveNewLinesAndTabs(input string) string

RemoveNewLinesAndTabs removes all new lines and tabs from a string

func StringPtr added in v1.1.0

func StringPtr(input string) *string

StringPtr converts a string to a string pointer

func StringSliceElementsAreUnique

func StringSliceElementsAreUnique(slice []string) bool

StringSliceElementsAreUnique checks if the given string slice contains unique elements only

Types

type ResourceNameFormatter

type ResourceNameFormatter interface {
	Format(name string) string
	UndoFormat(name string) string
}

ResourceNameFormatter interface for the library to format resource name with a terraform managed string when configured

func NewResourceNameFormatter

func NewResourceNameFormatter(prefix string, suffix string) ResourceNameFormatter

NewResourceNameFormatter creates a new formatter instance for the given prefix and suffix

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL