From 372cdb9790d7469098854f6c93aec065b49fb8da Mon Sep 17 00:00:00 2001 From: k1LoW Date: Fri, 15 Dec 2023 17:06:48 +0900 Subject: [PATCH] Rename k1LoW to 2manymws --- README.md | 8 ++++---- go.mod | 2 +- rl_test.go | 4 ++-- testdata/go_test.mod | 9 ++------- testdata/testbin/go.mod | 2 +- testdata/testbin/main.go | 4 ++-- testutil/limiter.go | 2 +- 7 files changed, 13 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 5a4224d..d0b15ea 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -# rl [![Go Reference](https://pkg.go.dev/badge/github.com/k1LoW/rl.svg)](https://pkg.go.dev/github.com/k1LoW/rl) [![build](https://github.com/k1LoW/rl/actions/workflows/ci.yml/badge.svg)](https://github.com/k1LoW/rl/actions/workflows/ci.yml) ![Coverage](https://raw.githubusercontent.com/k1LoW/octocovs/main/badges/k1LoW/rl/coverage.svg) ![Code to Test Ratio](https://raw.githubusercontent.com/k1LoW/octocovs/main/badges/k1LoW/rl/ratio.svg) ![Test Execution Time](https://raw.githubusercontent.com/k1LoW/octocovs/main/badges/k1LoW/rl/time.svg) +# rl [![Go Reference](https://pkg.go.dev/badge/github.com/2manymws/rl.svg)](https://pkg.go.dev/github.com/2manymws/rl) [![build](https://github.com/2manymws/rl/actions/workflows/ci.yml/badge.svg)](https://github.com/2manymws/rl/actions/workflows/ci.yml) ![Coverage](https://raw.githubusercontent.com/k1LoW/octocovs/main/badges/k1LoW/rl/coverage.svg) ![Code to Test Ratio](https://raw.githubusercontent.com/k1LoW/octocovs/main/badges/k1LoW/rl/ratio.svg) ![Test Execution Time](https://raw.githubusercontent.com/k1LoW/octocovs/main/badges/k1LoW/rl/time.svg) `rl` is a **r**ate **l**imit middleware for multiple limit rules. ## Usage -Prepare an instance that implements [`rl.Limiter`](https://pkg.go.dev/github.com/k1LoW/rl#Limiter) interface. +Prepare an instance that implements [`rl.Limiter`](https://pkg.go.dev/github.com/2manymws/rl#Limiter) interface. -Then, generate the middleware ( `func(next http.Handler) http.Handler` ) with [`rl.New`](https://pkg.go.dev/github.com/k1LoW/rl#New) +Then, generate the middleware ( `func(next http.Handler) http.Handler` ) with [`rl.New`](https://pkg.go.dev/github.com/2manymws/rl#New) ```go package main @@ -15,7 +15,7 @@ import ( "log" "net/http" - "github.com/k1LoW/rl" + "github.com/2manymws/rl" ) func main() { diff --git a/go.mod b/go.mod index 8a4b9a7..9ae21d5 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/k1LoW/rl +module github.com/2manymws/rl go 1.21.0 diff --git a/rl_test.go b/rl_test.go index 977b3be..57af199 100644 --- a/rl_test.go +++ b/rl_test.go @@ -7,9 +7,9 @@ import ( "strings" "testing" + "github.com/2manymws/rl" + "github.com/2manymws/rl/testutil" "github.com/go-chi/httprate" - "github.com/k1LoW/rl" - "github.com/k1LoW/rl/testutil" ) var _ rl.Limiter = (*testutil.Limiter)(nil) diff --git a/testdata/go_test.mod b/testdata/go_test.mod index 1db5631..9ae21d5 100644 --- a/testdata/go_test.mod +++ b/testdata/go_test.mod @@ -1,10 +1,5 @@ -module github.com/k1LoW/rl +module github.com/2manymws/rl go 1.21.0 -require ( - github.com/go-chi/httprate v0.7.4 - golang.org/x/sync v0.3.0 -) - -require github.com/cespare/xxhash/v2 v2.1.2 // indirect +require golang.org/x/sync v0.5.0 diff --git a/testdata/testbin/go.mod b/testdata/testbin/go.mod index 0ac5c7e..0b75488 100644 --- a/testdata/testbin/go.mod +++ b/testdata/testbin/go.mod @@ -1,4 +1,4 @@ -module github.com/k1LoW/rl/testdata/testbin +module github.com/2manymws/rl/testdata/testbin go 1.21.1 diff --git a/testdata/testbin/main.go b/testdata/testbin/main.go index 7f46ccc..bbe05b1 100644 --- a/testdata/testbin/main.go +++ b/testdata/testbin/main.go @@ -7,9 +7,9 @@ import ( "os" "strconv" + "github.com/2manymws/rl" + "github.com/2manymws/rl/testutil" "github.com/go-chi/httprate" - "github.com/k1LoW/rl" - "github.com/k1LoW/rl/testutil" ) func main() { diff --git a/testutil/limiter.go b/testutil/limiter.go index 251f880..084d1da 100644 --- a/testutil/limiter.go +++ b/testutil/limiter.go @@ -5,8 +5,8 @@ import ( "net/http" "time" + "github.com/2manymws/rl" "github.com/go-chi/httprate" - "github.com/k1LoW/rl" ) type Limiter struct {