use 'strconv.Quote()` instead of string formatter
This commit is contained in:
parent
f145261e85
commit
d4757efc68
1 changed files with 2 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
package objects
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"github.com/d5/tengo/compiler/token"
|
||||
)
|
||||
|
@ -17,7 +17,7 @@ func (o *String) TypeName() string {
|
|||
}
|
||||
|
||||
func (o *String) String() string {
|
||||
return fmt.Sprintf("%q", o.Value)
|
||||
return strconv.Quote(o.Value)
|
||||
}
|
||||
|
||||
// BinaryOp returns another object that is the result of
|
||||
|
|
Loading…
Reference in a new issue