From e4b86631547e38e258b210faca3cab104f622fc2 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Fri, 7 Jul 2023 10:05:34 +0800 Subject: [PATCH 1/4] chore: unnecessary use of fmt.Sprintf --- internal/rdb/inspect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rdb/inspect.go b/internal/rdb/inspect.go index 632e06b..cbaf4bf 100644 --- a/internal/rdb/inspect.go +++ b/internal/rdb/inspect.go @@ -343,7 +343,7 @@ func (r *RDB) memoryUsage(qname string) (int64, error) { } usg, err := cast.ToInt64E(res) if err != nil { - return 0, errors.E(op, errors.Internal, fmt.Sprintf("could not cast script return value to int64")) + return 0, errors.E(op, errors.Internal, "could not cast script return value to int64") } return usg, nil } From 90af7749cabe4ad2a51b20c5a2ec28eb7062c573 Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Fri, 7 Jul 2023 20:54:12 -0700 Subject: [PATCH 2/4] Update FUNDING.yml --- .github/FUNDING.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 6f20e0b..9631d4c 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,12 +1,4 @@ # These are supported funding model platforms -github: [hibiken] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: # Replace with a single Ko-fi username -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] +github: [hibiken] +open_collective: ken-hibino From 5bef53d1acaa8c0f645cbfd0826dead038f7f902 Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Fri, 7 Jul 2023 21:00:05 -0700 Subject: [PATCH 3/4] Update README.md to include sponsoring section --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index b399673..a2da8bd 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,9 @@ Task queues are used as a mechanism to distribute work across multiple machines. > ☝️ **Important Note**: Current major version is zero (`v0.x.x`) to accommodate rapid development and fast iteration while getting early feedback from users (_feedback on APIs are appreciated!_). The public API could change without a major version update before `v1.0.0` release. +## Sponsoring +If you are using this package in production, **please consider sponsoring the project to show your support!** + ## Quickstart Make sure you have Go installed ([download](https://golang.org/dl/)). Version `1.14` or higher is required. From 123d560a4488fad0998a90f46cada46e3849b20d Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Fri, 7 Jul 2023 10:03:11 +0800 Subject: [PATCH 4/4] chore: replace loop with mux.mws = append(mux.mws, mws...) --- servemux.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/servemux.go b/servemux.go index c11fbce..411dcf8 100644 --- a/servemux.go +++ b/servemux.go @@ -144,9 +144,7 @@ func (mux *ServeMux) HandleFunc(pattern string, handler func(context.Context, *T func (mux *ServeMux) Use(mws ...MiddlewareFunc) { mux.mu.Lock() defer mux.mu.Unlock() - for _, fn := range mws { - mux.mws = append(mux.mws, fn) - } + mux.mws = append(mux.mws, mws...) } // NotFound returns an error indicating that the handler was not found for the given task.