Explorar el Código

Always return qrs from NewQueryResults

Niko Kovacevic hace 5 años
padre
commit
2f4720136d
Se han modificado 1 ficheros con 2 adiciones y 4 borrados
  1. 2 4
      pkg/prom/result.go

+ 2 - 4
pkg/prom/result.go

@@ -178,10 +178,8 @@ func NewQueryResults(query string, queryResult interface{}) *QueryResults {
 		})
 	}
 
-	return &QueryResults{
-		Query:   query,
-		Results: results,
-	}
+	qrs.Results = results
+	return qrs
 }
 
 // GetString returns the requested field, or an error if it does not exist