Skip to content

Commit

Permalink
style: move min() function from write/service.go to write/service_tes…
Browse files Browse the repository at this point in the history
…t.go

min() function isn't used in service.go, only in service_test.go
  • Loading branch information
seth-hunter committed Jun 20, 2022
1 parent b478ce0 commit adfb995
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 0 additions & 7 deletions internal/write/service.go
Expand Up @@ -356,10 +356,3 @@ func precisionToString(precision time.Duration) string {
}
return prec
}

func min(a, b uint) uint {
if a > b {
return b
}
return a
}
7 changes: 7 additions & 0 deletions internal/write/service_test.go
Expand Up @@ -249,6 +249,13 @@ func TestMaxRetryInterval(t *testing.T) {
assert.Equal(t, 4, srv.retryQueue.list.Len())
}

func min(a, b uint) uint {
if a > b {
return b
}
return a
}

func TestMaxRetries(t *testing.T) {
log.Log.SetLogLevel(log.DebugLevel)
hs := test.NewTestService(t, "http://localhost:8086")
Expand Down

0 comments on commit adfb995

Please sign in to comment.