File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ const InterpSplitDelim = `B780FFEC-B661-4EB8-9236-A01737AD98B6`
1616
1717// interpRegexp is a regexp that matches interpolations such as ${foo.bar}
1818var interpRegexp * regexp.Regexp = regexp .MustCompile (
19- `(?i)(\$+)\{([\s*-.,\\/\(\)a-z0-9_"]+)\}` )
19+ `(?i)(\$+)\{([\s*-.,\\/\(\): a-z0-9_"]+)\}` )
2020
2121// interpolationWalker implements interfaces for the reflectwalk package
2222// (github.com/mitchellh/reflectwalk) that can be used to automatically
Original file line number Diff line number Diff line change @@ -129,6 +129,25 @@ func TestInterpolationWalker_detect(t *testing.T) {
129129 },
130130 },
131131 },
132+
133+ {
134+ Input : map [string ]interface {}{
135+ "foo" : `${concat("localhost", ":8080")}` ,
136+ },
137+ Result : []Interpolation {
138+ & FunctionInterpolation {
139+ Func : nil ,
140+ Args : []Interpolation {
141+ & LiteralInterpolation {
142+ Literal : "localhost" ,
143+ },
144+ & LiteralInterpolation {
145+ Literal : ":8080" ,
146+ },
147+ },
148+ },
149+ },
150+ },
132151 }
133152
134153 for i , tc := range cases {
You can’t perform that action at this time.
0 commit comments