strutil

package
v0.1.927 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultIfEmpty

func DefaultIfEmpty(input string, defaultValue string) string

func DefaultIfEmptyOrNil

func DefaultIfEmptyOrNil(input *string, defaultValue string) string

func EmptyIfNil

func EmptyIfNil(input *string) string

func EmptyPointerIfNil added in v0.1.877

func EmptyPointerIfNil(input *string) *string

func EnsureSuffix

func EnsureSuffix(input string, suffix string) string

func FalseIfNil

func FalseIfNil(input *bool) bool

func NilIfEmpty

func NilIfEmpty(input string) *string

func NilIfEmptyPointer

func NilIfEmptyPointer(input *string) *string

func NilIfFalse

func NilIfFalse(input bool) *bool

func ParseBool

func ParseBool(input string) bool

func ParseBoolPointer

func ParseBoolPointer(input *string) *bool

func StrPointer added in v0.1.525

func StrPointer(input string) *string

func UnEscapeDollar

func UnEscapeDollar(input string) string

func UnEscapeDollarInMap added in v0.1.903

func UnEscapeDollarInMap(fileMap map[string]string) map[string]string

UnEscapeDollarInMap is a naive way of unescaping strings that assumes any string whose entire contents is two dollar signs, an opening curly bracket, some content, and a closing curly bracket was meant to be a HCL interpolated string. Where this assumption doesn't hold, converters must write attributes manually rather than rely on this method. See ProjectConverter for an example where the description field is written out manually.

Types

This section is empty.

Jump to

Keyboard shortcuts

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