Skip to content

Commit

Permalink
fix: remove unused code pointed out by review
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Stockton committed Sep 25, 2024
1 parent 547929b commit 481d387
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions internal/conf/rate.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,6 @@ func (r *Rate) EventsPerSecond() float64 {
return r.Events / r.OverTime.Seconds()
}

// DefaultOverTime sets the OverTime field to overTime if it is 0.
func (r *Rate) DefaultOverTime(overTime time.Duration) Rate {
if r.OverTime == 0 {
return Rate{
Events: r.Events,
OverTime: time.Hour,
}
}

return *r
}

// Decode is used by envconfig to parse the env-config string to a Rate value.
func (r *Rate) Decode(value string) error {
if f, err := strconv.ParseFloat(value, 64); err == nil {
Expand Down

0 comments on commit 481d387

Please sign in to comment.