Skip to content

Commit

Permalink
Rename var to be more obvious
Browse files Browse the repository at this point in the history
  • Loading branch information
klausman committed Apr 8, 2024
1 parent 0e1be65 commit ea32fae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stat.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ type Stat struct {
}

func (s Stat) String() string {
var acc strings.Builder
var res strings.Builder
for k, v := range s.Fields {
acc.WriteString(fmt.Sprintf("%s=%s;", k, v))
res.WriteString(fmt.Sprintf("%s=%s;", k, v))
}
acc.WriteString(fmt.Sprintf("By=%d;Pk=%d", s.Bytes, s.Packets))
return acc.String()
res.WriteString(fmt.Sprintf("By=%d;Pk=%d", s.Bytes, s.Packets))
return res.String()
}

// NewStat creates a new Stat object with the Fields map initialized
Expand Down

0 comments on commit ea32fae

Please sign in to comment.