Fix whitespace with "make format".

pull/43/head
Julius Volz 2013-01-18 00:07:00 +01:00
parent 86e5edc7fe
commit a20bf35997
5 changed files with 64 additions and 65 deletions

View File

@ -48,7 +48,7 @@ func (serv MetricsService) QueryRange(Expr string, End int64, Range int64, Step
Step = 1 Step = 1
} }
if End - Range < 0 { if End-Range < 0 {
Range = End Range = End
} }
@ -57,9 +57,9 @@ func (serv MetricsService) QueryRange(Expr string, End int64, Range int64, Step
matrix := ast.EvalVectorRange( matrix := ast.EvalVectorRange(
exprNode.(ast.VectorNode), exprNode.(ast.VectorNode),
time.Unix(End - Range, 0), time.Unix(End-Range, 0),
time.Unix(End, 0), time.Unix(End, 0),
time.Duration(Step) * time.Second) time.Duration(Step)*time.Second)
sort.Sort(matrix) sort.Sort(matrix)
return ast.TypedValueToJSON(matrix, "matrix") return ast.TypedValueToJSON(matrix, "matrix")

View File

@ -14,8 +14,8 @@
package model package model
import ( import (
"time"
"fmt" "fmt"
"time"
) )
// A Fingerprint is a simplified representation of an entity---e.g., a hash of // A Fingerprint is a simplified representation of an entity---e.g., a hash of

View File

@ -537,7 +537,6 @@ func (matrix Matrix) Swap(i, j int) {
matrix[i], matrix[j] = matrix[j], matrix[i] matrix[i], matrix[j] = matrix[j], matrix[i]
} }
func (node *StringLiteral) Eval(timestamp *time.Time) string { func (node *StringLiteral) Eval(timestamp *time.Time) string {
return node.str return node.str
} }