File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,24 @@ func (c *CommonInserter) setRefs(item map[string]interface{}) map[string]interfa
92
92
reg := regexp .MustCompile (`\#\{.*?\}` )
93
93
for k , v := range item {
94
94
switch vt := v .(type ) {
95
+ case []string :
96
+ new := make ([]string , len (vt ))
97
+ for i , vtv := range vt {
98
+ if strings .HasPrefix (vtv , "$" ) && ! reg .MatchString (vtv ) {
99
+ refID := strings .TrimPrefix (vtv , "$" )
100
+ rv , ok := c .refIDs [refID ]
101
+ if ! ok {
102
+ log .Printf ("%s was not found" , refID )
103
+ } else {
104
+ new [i ] = rv
105
+ }
106
+ }
107
+ n := c .replaceMultiRefs (vtv , reg )
108
+ if n != "" {
109
+ new [i ] = n
110
+ }
111
+ }
112
+ item [k ] = new
95
113
case map [string ]interface {}:
96
114
for vtk , vtv := range vt {
97
115
if strings .HasPrefix (vtk , "$" ) && ! reg .MatchString (vtk ) {
You can’t perform that action at this time.
0 commit comments