feat: add rate limiter #1
Annotations
10 errors and 1 warning
Lint:
pkg/infrared/infrared.go#L137
Error return value of `ir.sg.listenAndServe` is not checked (errcheck)
|
Lint:
pkg/infrared/infrared_test.go#L184
Error return value of `ir.sg.listenAndServe` is not checked (errcheck)
|
Lint:
pkg/infrared/infrared_test.go#L185
Error return value of `ir.listenAndServe` is not checked (errcheck)
|
Lint:
pkg/infrared/infrared_test.go#L190
Error return value of `outConn.WritePackets` is not checked (errcheck)
|
Lint:
pkg/infrared/infrared_test.go#L194
Error return value of `outConn.ReadPackets` is not checked (errcheck)
|
Lint:
pkg/infrared/infrared_test.go#L195
Error return value of `outConn.WritePackets` is not checked (errcheck)
|
Lint:
pkg/infrared/infrared_test.go#L196
Error return value of `outConn.ReadPackets` is not checked (errcheck)
|
Lint:
pkg/infrared/rate_limiter.go#L226
Error return value of `h.WriteString` is not checked (errcheck)
|
Lint:
pkg/infrared/rate_limiter.go#L227
Error return value of `h.WriteString` is not checked (errcheck)
|
Lint:
pkg/infrared/infrared_test.go#L30
cognitive complexity 28 of func `BenchmarkInfrared_handleConn` is high (> 20) (gocognit)
|
Lint:
pkg/infrared/rate_limiter.go#L186
increment-decrement: should replace v.value += 1 with v.value++ (revive)
|