mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-28 17:19:24 +00:00
Update vendor d5/tengo
This commit is contained in:
6
vendor/github.com/d5/tengo/objects/builtin_json.go
generated
vendored
6
vendor/github.com/d5/tengo/objects/builtin_json.go
generated
vendored
@ -2,6 +2,8 @@ package objects
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/d5/tengo"
|
||||
)
|
||||
|
||||
// to_json(v object) => bytes
|
||||
@ -15,6 +17,10 @@ func builtinToJSON(args ...Object) (Object, error) {
|
||||
return &Error{Value: &String{Value: err.Error()}}, nil
|
||||
}
|
||||
|
||||
if len(res) > tengo.MaxBytesLen {
|
||||
return nil, ErrBytesLimit
|
||||
}
|
||||
|
||||
return &Bytes{Value: res}, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user