Go: fix encoding parameters to Go representation (#17525)
This commit is contained in:
parent
fe68c91554
commit
81fdf0fac7
1 changed files with 1 additions and 5 deletions
|
|
@ -186,11 +186,7 @@ func (p *Go) evaluate() (res any, err error) {
|
|||
}
|
||||
|
||||
func (p *Go) setParam(param string, val any) error {
|
||||
if str, ok := val.(string); ok {
|
||||
val = "\"" + str + "\""
|
||||
}
|
||||
|
||||
_, err := p.vm.Eval(fmt.Sprintf("%s := %v;", param, val))
|
||||
_, err := p.vm.Eval(fmt.Sprintf("%s := %#v;", param, val))
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue