Skip to content

Commit

Permalink
change interface{} to any for simplicity
Browse files Browse the repository at this point in the history
  • Loading branch information
arriven committed Apr 25, 2022
1 parent 2444c4d commit 1db31d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func NewReporter(clientID string) *Reporter { return &Reporter{clientID: clientI
func (r *Reporter) Sum(s Stat) uint64 {
var res uint64

r.metrics[s].Range(func(_, v interface{}) bool {
r.metrics[s].Range(func(_, v any) bool {
value, ok := v.(uint64)
if !ok {
return true
Expand Down Expand Up @@ -135,7 +135,7 @@ func (r *Reporter) SumAllStatsByTarget() PerTargetStats {
res := make(PerTargetStats)

for s := RequestsAttemptedStat; s < NumStats; s++ {
r.metrics[s].Range(func(k, v interface{}) bool {
r.metrics[s].Range(func(k, v any) bool {
d, ok := k.(dimensions)
if !ok {
return true
Expand Down

0 comments on commit 1db31d7

Please sign in to comment.