Variable collisions; Possible use of nil value (#256)
* Variable '*' collides with imported package name * Variable 'error' collides with builtin interface * '*' may have 'nil' or other unexpected value as its corresponding error variable may be not 'nil'
This commit is contained in:
@@ -9,8 +9,8 @@ import (
|
||||
|
||||
// GetHardwareStats will return hardware utilization over time
|
||||
func GetHardwareStats(w http.ResponseWriter, r *http.Request) {
|
||||
metrics := metrics.Metrics
|
||||
m := metrics.Metrics
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(metrics)
|
||||
json.NewEncoder(w).Encode(m)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user