File tree Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Expand file tree Collapse file tree 1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -70,27 +70,29 @@ func (c *CommonInserter) setRefs(item map[string]interface{}) map[string]interfa
70
70
switch vt := v .(type ) {
71
71
case map [string ]interface {}:
72
72
for vtk , vtv := range vt {
73
- if strings .HasPrefix (vtk , "$" ) {
74
- refID := strings .TrimPrefix (vtk , "$" )
75
- rk , ok := c .refIDs [refID ]
76
- if ! ok {
77
- log .Printf ("%s was not found" , refID )
78
- continue
79
- }
80
- vt [rk ] = vtv
81
- delete (vt , vtk )
73
+ if ! strings .HasPrefix (vtk , "$" ) {
74
+ continue
82
75
}
83
- }
84
- case string :
85
- if strings .HasPrefix (vt , "$" ) {
86
- refID := strings .TrimPrefix (vt , "$" )
87
- rv , ok := c .refIDs [refID ]
76
+ refID := strings .TrimPrefix (vtk , "$" )
77
+ rk , ok := c .refIDs [refID ]
88
78
if ! ok {
89
79
log .Printf ("%s was not found" , refID )
90
80
continue
91
81
}
92
- item [k ] = rv
82
+ vt [rk ] = vtv
83
+ delete (vt , vtk )
84
+ }
85
+ case string :
86
+ if ! strings .HasPrefix (vt , "$" ) {
87
+ continue
88
+ }
89
+ refID := strings .TrimPrefix (vt , "$" )
90
+ rv , ok := c .refIDs [refID ]
91
+ if ! ok {
92
+ log .Printf ("%s was not found" , refID )
93
+ continue
93
94
}
95
+ item [k ] = rv
94
96
}
95
97
}
96
98
You can’t perform that action at this time.
0 commit comments