diff options
author | 2017-06-14 09:37:10 -0700 | |
---|---|---|
committer | 2017-06-14 09:37:10 -0700 | |
commit | e49ca86ce463395f7d0d2b997c93d25e3d101ca0 (patch) | |
tree | 9457aa245a6ccc278a296d341370eae99e1f78b2 /middleware/cache/freq/freq.go | |
parent | 5c10eba31c17dcc5d95431e655280fff19979a34 (diff) | |
download | coredns-e49ca86ce463395f7d0d2b997c93d25e3d101ca0.tar.gz coredns-e49ca86ce463395f7d0d2b997c93d25e3d101ca0.tar.zst coredns-e49ca86ce463395f7d0d2b997c93d25e3d101ca0.zip |
cleanup: go vet and golint run (#736)
* cleanup: go vet and golint run
Various cleanups trickered by go vet and golint.
* Fix tests and lowercase all errors
Lowercase all errors, some tests in kubernetes use errors from
kubernetes which do start with a capital letter.
Diffstat (limited to 'middleware/cache/freq/freq.go')
-rw-r--r-- | middleware/cache/freq/freq.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/middleware/cache/freq/freq.go b/middleware/cache/freq/freq.go index 528eedc1c..4e7f7722e 100644 --- a/middleware/cache/freq/freq.go +++ b/middleware/cache/freq/freq.go @@ -7,6 +7,7 @@ import ( "time" ) +// Freq tracks the frequence of things. type Freq struct { // Last time we saw a query for this element. last time.Time @@ -21,7 +22,7 @@ func New(t time.Time) *Freq { return &Freq{last: t, hits: 0} } -// Updates updates the number of hits. Last time seen will be set to now. +// Update updates the number of hits. Last time seen will be set to now. // If the last time we've seen this entity is within now - d, we increment hits, otherwise // we reset hits to 1. It returns the number of hits. func (f *Freq) Update(d time.Duration, now time.Time) int { |