Bump cel-go to v0.12.0
This commit is contained in:
5
vendor/github.com/google/cel-go/common/error.go
generated
vendored
5
vendor/github.com/google/cel-go/common/error.go
generated
vendored
@@ -31,6 +31,9 @@ type Error struct {
|
||||
const (
|
||||
dot = "."
|
||||
ind = "^"
|
||||
|
||||
// maxSnippetLength is the largest number of characters which can be rendered in an error message snippet.
|
||||
maxSnippetLength = 16384
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -45,7 +48,7 @@ func (e *Error) ToDisplayString(source Source) string {
|
||||
e.Location.Line(),
|
||||
e.Location.Column()+1, // add one to the 0-based column for display
|
||||
e.Message)
|
||||
if snippet, found := source.Snippet(e.Location.Line()); found {
|
||||
if snippet, found := source.Snippet(e.Location.Line()); found && len(snippet) <= maxSnippetLength {
|
||||
snippet := strings.Replace(snippet, "\t", " ", -1)
|
||||
srcLine := "\n | " + snippet
|
||||
var bytes = []byte(snippet)
|
||||
|
Reference in New Issue
Block a user