Skip to content

Commit

Permalink
fixed bug parse array interface
Browse files Browse the repository at this point in the history
  • Loading branch information
navrotskyj committed Sep 5, 2018
1 parent 08b2386 commit 2bf4310
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/pkg/call/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,14 @@ func parseArgsToArrayInterface(c *Call, _args interface{}) (argsElem []interface
switch _args.(type) {
case []interface{}:
for _, e := range _args.([]interface{}) {
if str, ok = e.(string); ok && !regCompileLocalRegs.MatchString(str) && regCompileReg.MatchString(str) {
argsElem = append(argsElem, e)
if str, ok = e.(string); ok {
if !regCompileLocalRegs.MatchString(str) && regCompileReg.MatchString(str) {
argsElem = append(argsElem, e)
} else {
argsElem = append(argsElem, c.ParseString(str))
}
} else {
argsElem = append(argsElem, c.ParseString(str))
argsElem = append(argsElem, e)
}
}
case string:
Expand Down

0 comments on commit 2bf4310

Please sign in to comment.