From bdc601817d17b79595d9ca2b5c144693bfdd738b Mon Sep 17 00:00:00 2001 From: Tomasz Piowczyk Date: Wed, 4 Oct 2023 15:05:01 +0200 Subject: [PATCH 1/2] Prepare repository for release (#40) --- README.md | 2 +- di/constructor.go | 2 +- httpf/rate.go | 2 +- rate/limiter.go | 2 +- rate/memory/store.go | 2 +- rate/wait.go | 2 +- tests/assert/slices_test.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 4a7d4e9..e449989 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Go-flow [![Go Reference](https://pkg.go.dev/badge/github.com/Prastiwar/go-flow.svg)](https://pkg.go.dev/github.com/Prastiwar/Go-flow) -[![Go Report Card](https://goreportcard.com/badge/github.com/oklahomer/go-sarah)](https://goreportcard.com/report/github.com/Prastiwar/Go-flow) +[![Go Report Card](https://goreportcard.com/badge/github.com/Prastiwar/go-flow)](https://goreportcard.com/report/github.com/Prastiwar/Go-flow) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Prastiwar_Go-flow&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Prastiwar_Go-flow) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Prastiwar_Go-flow&metric=coverage)](https://sonarcloud.io/summary/new_code?id=Prastiwar_Go-flow) diff --git a/di/constructor.go b/di/constructor.go index 609d610..5708685 100644 --- a/di/constructor.go +++ b/di/constructor.go @@ -33,7 +33,7 @@ type Constructor interface { // Dependencies returns an array of reflect.Type defining type of dependencies for object to construct. Dependencies() []reflect.Type - // Life returns LifeTime which defines scope of existance for constructed object. + // Life returns LifeTime which defines scope of existence for constructed object. Life() LifeTime } diff --git a/httpf/rate.go b/httpf/rate.go index 53f48f7..a3934bd 100644 --- a/httpf/rate.go +++ b/httpf/rate.go @@ -81,7 +81,7 @@ func ComposeRateKeyFactories(factories ...RateHttpKeyFactory) RateHttpKeyFactory // RateLimitMiddleware returns httpf.Handler which uses rate-limiting feature to decide if h Handler can be requested. // If rate limit exceeds maximum value, the error is returned and should be handled by ErrorHandler to actually -// return 429 status code with appropiate body. This middleware writes all of +// return 429 status code with appropriate body. This middleware writes all of // "X-Rate-Limit-Limit", "X-Rate-Limit-Remaining" and "X-Rate-Limit-Reset" headers with correct values. func RateLimitMiddleware(h Handler, store rate.LimiterStore, keyFactory RateHttpKeyFactory) Handler { if store == nil { diff --git a/rate/limiter.go b/rate/limiter.go index f19e28d..ca177a9 100644 --- a/rate/limiter.go +++ b/rate/limiter.go @@ -3,7 +3,7 @@ // The package does contain example alghoritm most often used in Web API's but there are much more algorithms already implemented // in Go which are open-sourced by the Golang community. Use this package to abstract away the specific implementations // provided by third party libraries. This requires to write an adapter for implementation to fulfill rate interfaces -// in your infrastracture layer. +// in your infrastructure layer. package rate import "context" diff --git a/rate/memory/store.go b/rate/memory/store.go index cd7be42..2343f22 100644 --- a/rate/memory/store.go +++ b/rate/memory/store.go @@ -15,7 +15,7 @@ var ( ) var ( - ErrCleanupFailure = errors.New("at least one error occured at cleanup") + ErrCleanupFailure = errors.New("at least one error occurred at cleanup") ErrMissingAlgorithm = errors.New("nil LimiterAlgorithm was passed to constructor") ) diff --git a/rate/wait.go b/rate/wait.go index 8e7dd20..8caa0fe 100644 --- a/rate/wait.go +++ b/rate/wait.go @@ -24,7 +24,7 @@ func Wait(ctx context.Context, deadline time.Time) error { } } -// ConsumeAndWait calls Take() on Limiter and immedietely Use the Token. If ErrRateLimitExceeded error occurs +// ConsumeAndWait calls Take() on Limiter and immediately Use the Token. If ErrRateLimitExceeded error occurs // it pauses the current goroutine until Limiter's ResetsAt() time deadline exceeds. If Take() returns any // other error it'll immediately return this error. When ctx is canceled or ctx deadline exceeds before // reset time it'll return this error. diff --git a/tests/assert/slices_test.go b/tests/assert/slices_test.go index 3625298..e40c1f6 100644 --- a/tests/assert/slices_test.go +++ b/tests/assert/slices_test.go @@ -24,7 +24,7 @@ func TestElementsMatch(t *testing.T) { fails: false, }, { - name: "not-matches-similiar", + name: "not-matches-similar", arrA: []any{ 1, 2, 3, }, From 9f806e6dfc7553fc3dce7cdbf68a86fee27eecb1 Mon Sep 17 00:00:00 2001 From: Tomasz Piowczyk Date: Wed, 4 Oct 2023 15:06:59 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/README.md b/README.md index e449989..aa9a2ee 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ Backend framework library written in Go for Gophers who want to focus on building great quality backend. It mostly provides dependency inversion to most common built systems to allow easily modularize our application and change implementation without changing our business logic. This is very cost-effective for organizations moving forward from MVP. The framework is viable for both personal and organization level usage where there are multiple products, APIs and development consistency is needed. - [Go-flow](#go-flow) - - [Production readiness](#production-readiness) - [Download](#download) - [Library purpose](#library-purpose) - [Packages](#packages) @@ -28,12 +27,6 @@ Backend framework library written in Go for Gophers who want to focus on buildin - [Contributing](#contributing) - [License](#license) -## Production readiness - -The library is in final phase before the stable version release. The phase consist of private project released to production. Though it can be already used in production until a stable v1 version release you should keep in mind that some breaking changes can still happen and will not increase the major version. Every breaking change will be noted either in the version release or pull request description. - -For release information see https://github.com/Prastiwar/Go-flow/discussions/27 - ## Download See latest version: https://github.com/Prastiwar/Go-flow/releases/latest