summaryrefslogtreecommitdiffhomepage
path: root/ratelimiter/ratelimiter.go
AgeCommit message (Collapse)Author
2019-06-03device, ratelimiter: replace uses of time.Now().Sub() with time.Since()Matt Layher
Simplification found by staticcheck: $ staticcheck ./... | grep S1012 device/cookie.go:90:5: should use time.Since instead of time.Now().Sub (S1012) device/cookie.go:127:5: should use time.Since instead of time.Now().Sub (S1012) device/cookie.go:242:5: should use time.Since instead of time.Now().Sub (S1012) device/noise-protocol.go:304:13: should use time.Since instead of time.Now().Sub (S1012) device/receive.go:82:46: should use time.Since instead of time.Now().Sub (S1012) device/send.go:132:5: should use time.Since instead of time.Now().Sub (S1012) device/send.go:139:5: should use time.Since instead of time.Now().Sub (S1012) device/send.go:235:59: should use time.Since instead of time.Now().Sub (S1012) device/send.go:393:9: should use time.Since instead of time.Now().Sub (S1012) ratelimiter/ratelimiter.go:79:10: should use time.Since instead of time.Now().Sub (S1012) ratelimiter/ratelimiter.go:87:10: should use time.Since instead of time.Now().Sub (S1012) Change applied using: $ find . -type f -name "*.go" -exec sed -i "s/Now().Sub(/Since(/g" {} \; Signed-off-by: Matt Layher <mdlayher@gmail.com>
2019-02-05Extend structs rather than embed, when possibleJason A. Donenfeld
2019-02-05Update copyrightJason A. Donenfeld
2018-09-16global: fix up copyright headersJason A. Donenfeld
2018-05-21ratelimiter: do not run GC with nothing to doJason A. Donenfeld
2018-05-13Cleanup ratelimiterJason A. Donenfeld
2018-05-03global: Add SPDX tags and copyright headerJason A. Donenfeld
Mathias should probably add his copyright headers to each file too.
2018-02-12Use relative importsJason A. Donenfeld