From d1efc54112d978cfd8f7079b98ae2ca1fe113558 Mon Sep 17 00:00:00 2001 From: Anton Zadvorny Date: Mon, 26 Jun 2023 03:40:26 +0600 Subject: [PATCH] Fix comment format --- auth/jwt/jwt.go | 2 +- auth/token/token.go | 2 +- logger/logger.go | 2 +- ratelimit/rate_limit.go | 2 +- recoverer/recoverer.go | 2 +- throttle/throttle.go | 2 +- timeout/timeout.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/auth/jwt/jwt.go b/auth/jwt/jwt.go index a13032e..946b0cd 100644 --- a/auth/jwt/jwt.go +++ b/auth/jwt/jwt.go @@ -32,7 +32,7 @@ var DefaultOptions = Options( SetValidateTokenFn(allowAll), ) -// Options turns a list of option instances into an option. +// Options turns a list of option instances into an option func Options(opts ...Option) Option { return func(a *auth) { for _, opt := range opts { diff --git a/auth/token/token.go b/auth/token/token.go index bb8a5d8..b006712 100644 --- a/auth/token/token.go +++ b/auth/token/token.go @@ -28,7 +28,7 @@ var DefaultOptions = Options( SetResponseHandler(RespondWithUnauthorized), ) -// Options turns a list of option instances into an option. +// Options turns a list of option instances into an option func Options(opts ...Option) Option { return func(a *auth) { for _, opt := range opts { diff --git a/logger/logger.go b/logger/logger.go index 64ee29d..fb1b018 100644 --- a/logger/logger.go +++ b/logger/logger.go @@ -17,7 +17,7 @@ var DefaultOptions = Options( SetLogHandler(DefaultLogHandler), ) -// Options turns a list of option instances into an option. +// Options turns a list of option instances into an option func Options(opts ...Option) Option { return func(l *logger) { for _, opt := range opts { diff --git a/ratelimit/rate_limit.go b/ratelimit/rate_limit.go index fd986e0..206558d 100644 --- a/ratelimit/rate_limit.go +++ b/ratelimit/rate_limit.go @@ -26,7 +26,7 @@ var DefaultOptions = Options( SetResponseHandler(RespondWithTooManyRequests), ) -// Options turns a list of option instances into an option. +// Options turns a list of option instances into an option func Options(opts ...Option) Option { return func(l *limiter) { for _, opt := range opts { diff --git a/recoverer/recoverer.go b/recoverer/recoverer.go index d8ba1fe..d077c9f 100644 --- a/recoverer/recoverer.go +++ b/recoverer/recoverer.go @@ -15,7 +15,7 @@ var DefaultOptions = Options( SetResponseHandler(RespondWithInternalServerError), ) -// Options turns a list of option instances into an option. +// Options turns a list of option instances into an option func Options(opts ...Option) Option { return func(r *recoverer) { for _, opt := range opts { diff --git a/throttle/throttle.go b/throttle/throttle.go index 55b7db5..3465e94 100644 --- a/throttle/throttle.go +++ b/throttle/throttle.go @@ -22,7 +22,7 @@ var DefaultOptions = Options( SetResponseHandler(RespondWithTooManyRequests), ) -// Options turns a list of option instances into an option. +// Options turns a list of option instances into an option func Options(opts ...Option) Option { return func(t *throttle) { for _, opt := range opts { diff --git a/timeout/timeout.go b/timeout/timeout.go index 5f8f849..1e80a33 100644 --- a/timeout/timeout.go +++ b/timeout/timeout.go @@ -14,7 +14,7 @@ var DefaultOptions = Options( SetResponseHandler(RespondWithTimeout), ) -// Options turns a list of option instances into an option. +// Options turns a list of option instances into an option func Options(opts ...Option) Option { return func(t *timeout) { for _, opt := range opts {