Added source and user marks to opportunities type. Any ignored errors are deferred to //nolint with a comment instead of being silently dropped
This commit is contained in:
1 parent
6e6dec68c0
commit
9b0e6dccfe
7 files changed
+65
-4
No files matched your search
@@ -114,7 +114,7 @@ func (rl *RateLimiter) Middleware(next http.HandlerFunc) http.HandlerFunc {
|
||||
w.Header().Set("Retry-After", strconv.Itoa(retry))
|
||||
w.Header().Set("Content-Type", "text/plain; charset=utf-8")
|
||||
w.WriteHeader(http.StatusTooManyRequests)
|
||||
_, _ = fmt.Fprintf(
|
||||
fmt.Fprintf( //nolint:errcheck // the client may have gone; nothing to do
|
||||
w, "Rate limit of %d exceeded. Please retry after %d seconds.",
|
||||
rl.limit, retry,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user