From b770167db66aea5205152e54beb7fdffeecf14ab Mon Sep 17 00:00:00 2001 From: Shaquille Wyan Que Date: Wed, 15 May 2019 10:52:15 -0500 Subject: [PATCH] fixed formatting --- pql/parser.go | 6 +++--- pql/pqlpeg_test.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pql/parser.go b/pql/parser.go index c9f92c61a..8c3b608c9 100644 --- a/pql/parser.go +++ b/pql/parser.go @@ -26,9 +26,9 @@ import ( // timeFormat is the go-style time format used to parse string dates. const timeFormat = "2006-01-02T15:04" -// duplicateArgErrorMessage is used as an error string in the parser. +// error strings in the parser const duplicateArgErrorMessage = "duplicate argument provided" -const parsingIntErrorMessage = "out of bounds" +const outOfBoundsErrorMessage = "out of bounds" // parser represents a parser for the PQL language. type parser struct { @@ -72,7 +72,7 @@ func (p *parser) Parse() (*Query, error) { p.Execute() }() if v != nil { - if strings.HasPrefix(v.(string), duplicateArgErrorMessage) || strings.HasPrefix(v.(string), parsingIntErrorMessage){ + if strings.HasPrefix(v.(string), duplicateArgErrorMessage) || strings.HasPrefix(v.(string), outOfBoundsErrorMessage) { return nil, fmt.Errorf("%s", v) } else { panic(v) diff --git a/pql/pqlpeg_test.go b/pql/pqlpeg_test.go index c9db07407..3ceff075d 100644 --- a/pql/pqlpeg_test.go +++ b/pql/pqlpeg_test.go @@ -333,7 +333,7 @@ func TestPEGErrors(t *testing.T) { { name: "RangeTimeOneStamp", input: "Row(a=4, 2010-07-04T00:00)"}, - { + { name: "ArgOutOfBounds", input: "Row(a=9223372036854775808)"}, {