Run go vet
Bugs found.
This commit is contained in:
parent
8118c8d3cc
commit
bf6412b55d
12 changed files with 28 additions and 14 deletions
|
|
@ -68,7 +68,7 @@ func (q *Query) buildIteratorTreeInternal(query interface{}, path Path) (it grap
|
|||
// Damn you, Javascript, and your lack of integer values.
|
||||
if math.Floor(t) == t {
|
||||
// Treat it like an integer.
|
||||
it = q.buildFixed(fmt.Sprintf("%d", t))
|
||||
it = q.buildFixed(fmt.Sprintf("%0.f", t))
|
||||
} else {
|
||||
it = q.buildFixed(fmt.Sprintf("%f", t))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ func TestMQL(t *testing.T) {
|
|||
if !reflect.DeepEqual(got, expect) {
|
||||
b, err := json.MarshalIndent(got, "", " ")
|
||||
if err != nil {
|
||||
t.Fatalf("unexpected JSON marshal error", err)
|
||||
t.Fatalf("unexpected JSON marshal error: %v", err)
|
||||
}
|
||||
t.Errorf("Failed to %s, got: %s expected: %s", test.message, b, test.expect)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue