From 4d75e7d31d15d0861190497d2eddadbf34a7d572 Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Sun, 17 Nov 2024 06:39:24 +0100 Subject: [PATCH 1/2] refactor: refactoring of code to meet all golangci-lint requirements --- internal/{checkConfig.go => check-config.go} | 0 main.go | 4 +--- 2 files changed, 1 insertion(+), 3 deletions(-) rename internal/{checkConfig.go => check-config.go} (100%) diff --git a/internal/checkConfig.go b/internal/check-config.go similarity index 100% rename from internal/checkConfig.go rename to internal/check-config.go diff --git a/main.go b/main.go index b27b37f..f41279e 100644 --- a/main.go +++ b/main.go @@ -15,9 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -import ( - "github.com/jkaninda/goma-gateway/cmd" -) +import "github.com/jkaninda/goma-gateway/cmd" func main() { From 0b5e11a5dde0595b1adcf01d7dc9a5072b562a2c Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Sun, 17 Nov 2024 06:40:58 +0100 Subject: [PATCH 2/2] refactor: refactoring of code to meet all golangci-lint requirements --- internal/middlewares/rate-limit.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/middlewares/rate-limit.go b/internal/middlewares/rate-limit.go index 3a1ac09..e63cb04 100644 --- a/internal/middlewares/rate-limit.go +++ b/internal/middlewares/rate-limit.go @@ -80,7 +80,7 @@ func (rl *RateLimiter) RateLimitMiddleware() mux.MiddlewareFunc { RespondWithError(w, http.StatusTooManyRequests, fmt.Sprintf("%d Too many requests, API requests limit exceeded. Please try again later", http.StatusTooManyRequests)) } } - // Proceed to the next handler if requests limit is not exceeded + // Proceed to the next handler if the request limit is not exceeded next.ServeHTTP(w, r) }) }