Skip to content

Commit

Permalink
fix(intrinsics): split function
Browse files Browse the repository at this point in the history
  • Loading branch information
xrn authored and rubenfonseca committed Jul 12, 2022
1 parent ffdc5af commit 286dd4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloudformation/intrinsics.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func GetAttPtr(logicalName string, attribute string) *string {

// Split splits a string into a list of string values so that you can select an element from the resulting string list, use the Fn::Split intrinsic function. Specify the location of splits with a delimiter, such as , (a comma). After you split a string, use the Fn::Select function to pick a specific element.
func Split(delimiter, source interface{}) string {
return fmt.Sprintf(`{ "Fn::Split" : [ %q, %q ] }`, delimiter, source)
return encode(fmt.Sprintf(`{ "Fn::Split" : [ %q, %q ] }`, delimiter, source))
}

func SplitPtr(delimiter, source interface{}) *[]string {
Expand Down

0 comments on commit 286dd4c

Please sign in to comment.