From c3602e5bcae8c07971f5199b486336dda7b52eac Mon Sep 17 00:00:00 2001 From: poteto0 Date: Fri, 3 Jan 2025 08:53:54 +0000 Subject: [PATCH] BREAKING: github.com/poteto0/poteto -> github.com/poteto-go/poteto --- .github/workflows/test-1_21.yaml | 2 +- .github/workflows/test-1_22.yaml | 2 +- .github/workflows/test-1_23.yaml | 8 ++++---- CHANGELOG.md | 2 +- CONTRIBUTING.md | 6 +++--- README.md | 10 +++++----- banner.go | 2 +- binder.go | 2 +- binder_test.go | 2 +- cmd/cmd-new/cmd_new.go | 4 ++-- cmd/cmd-new/cmd_new_test.go | 2 +- cmd/cmd-run/cmd_run.go | 8 ++++---- cmd/cmd-run/cmd_run_test.go | 4 ++-- cmd/core/runner_client.go | 2 +- cmd/engine/engine_new.go | 4 ++-- cmd/engine/engine_new_test.go | 2 +- cmd/engine/engine_run.go | 2 +- cmd/engine/engine_run_test.go | 2 +- cmd/poteto-cli/poteto-cli.go | 6 +++--- cmd/poteto-cli/poteto-cli_test.go | 4 ++-- cmd/template/defalut.go | 4 ++-- cmd/template/fast.go | 4 ++-- cmd/template/jsonrpc.go | 2 +- cmd/template/jsonrpc_fast.go | 2 +- context.go | 4 ++-- context_test.go | 2 +- examples/api/go.mod | 2 +- examples/api/go.sum | 4 ++-- examples/api/main.go | 4 ++-- examples/fast-api/go.mod | 2 +- examples/fast-api/go.sum | 4 ++-- examples/fast-api/main.go | 4 ++-- examples/jsonrpc/go.mod | 2 +- examples/jsonrpc/go.sum | 4 ++-- examples/jsonrpc/main.go | 2 +- go.mod | 2 +- http_param.go | 2 +- http_param_test.go | 2 +- ip_handler.go | 2 +- ip_handler_test.go | 2 +- middleware/README.md | 6 +++--- middleware/camara.go | 4 ++-- middleware/camara_test.go | 4 ++-- middleware/cors.go | 4 ++-- middleware/cors_test.go | 4 ++-- middleware/jws.go | 4 ++-- middleware/jws_test.go | 6 +++--- middleware/request_logger.go | 4 ++-- middleware/request_logger_test.go | 2 +- middleware/timeout.go | 2 +- middleware/timeout_test.go | 2 +- middleware/utils.go | 2 +- middleware/utils_test.go | 2 +- poteto.go | 4 ++-- poteto_rpc.go | 2 +- poteto_rpc_test.go | 2 +- response.go | 2 +- route.go | 8 ++++---- run_test.sh | 6 +++--- 59 files changed, 101 insertions(+), 101 deletions(-) diff --git a/.github/workflows/test-1_21.yaml b/.github/workflows/test-1_21.yaml index cb21da7..b70603d 100644 --- a/.github/workflows/test-1_21.yaml +++ b/.github/workflows/test-1_21.yaml @@ -23,6 +23,6 @@ jobs: with: go-version: "1.21.x" # noinlineによるテスト実行 - # https://github.com/poteto0/poteto/issues/169 + # https://github.com/poteto-go/poteto/issues/169 - name: Test run: go test ./... -cover -bench . -benchtime 100000x -gcflags=all=-l diff --git a/.github/workflows/test-1_22.yaml b/.github/workflows/test-1_22.yaml index 056271d..e806e36 100644 --- a/.github/workflows/test-1_22.yaml +++ b/.github/workflows/test-1_22.yaml @@ -23,6 +23,6 @@ jobs: with: go-version: "1.22.x" # noinlineによるテスト実行 - # https://github.com/poteto0/poteto/issues/169 + # https://github.com/poteto-go/poteto/issues/169 - name: Test run: go test ./... -cover -bench . -benchtime 100000x -gcflags=all=-l diff --git a/.github/workflows/test-1_23.yaml b/.github/workflows/test-1_23.yaml index 3e0db7b..b925864 100644 --- a/.github/workflows/test-1_23.yaml +++ b/.github/workflows/test-1_23.yaml @@ -23,15 +23,15 @@ jobs: with: go-version: "1.23.x" # noinlineによるテスト実行 - # https://github.com/poteto0/poteto/issues/169 + # https://github.com/poteto-go/poteto/issues/169 - name: Test run: go test ./... -coverprofile cover.out.tmp -bench . -benchtime 100000x -gcflags=all=-l - name: remove not template path - run: cat cover.out.tmp | grep -v "github.com/poteto0/poteto/cmd/template" > cover2.out.tmp + run: cat cover.out.tmp | grep -v "github.com/poteto-go/poteto/cmd/template" > cover2.out.tmp - name: remove not constant path - run: cat cover2.out.tmp | grep -v "github.com/poteto0/poteto/constant" > cover3.out.tmp + run: cat cover2.out.tmp | grep -v "github.com/poteto-go/poteto/constant" > cover3.out.tmp - name: remove example path - run: cat cover3.out.tmp | grep -v "github.com/poteto0/poteto/constant" > coverage.txt + run: cat cover3.out.tmp | grep -v "github.com/poteto-go/poteto/constant" > coverage.txt - name: upload coverage uses: codecov/codecov-action@v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1447a88..890b3cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ ### 0.26.5 - BUG: no-inline test; issue below by @poteto0 in #173 - https://github.com/poteto0/poteto/issues/169 + https://github.com/poteto-go/poteto/issues/169 - TEST: ut upgrated by @poteto0 in #173 - REF: split cmd & engine by @poteto0 in #173 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 10c9100..16abf3d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,12 +22,12 @@ I appreciate your consideration to contribute to this project! This document is If you find a bug or have a feature request, please open an issue on GitHub. -1. Check [the Issue Tracker](https://github.com/poteto0/poteto/issues) for existing issues. -2. When requesting a new issue or feature, please use [the templates](https://github.com/poteto0/poteto/issues/new?assignees=&labels=&projects=&template=-bug-----feature--issue-title.md&title=) and provide as much detail as possible. +1. Check [the Issue Tracker](https://github.com/poteto-go/poteto/issues) for existing issues. +2. When requesting a new issue or feature, please use [the templates](https://github.com/poteto-go/poteto/issues/new?assignees=&labels=&projects=&template=-bug-----feature--issue-title.md&title=) and provide as much detail as possible. ### Development -1. Check [the Issue Tracker](https://github.com/poteto0/poteto/issues), make sure if there is anything relevant to the problem you are trying to solve. Or create New Issue. +1. Check [the Issue Tracker](https://github.com/poteto-go/poteto/issues), make sure if there is anything relevant to the problem you are trying to solve. Or create New Issue. 2. Fork repo 3. Create a new branch. diff --git a/README.md b/README.md index 9a11df5..e2b49e8 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ We have confirmed that it works with various versions: go@1.21.x, go@1.22.x, go@1.23.x ```sh -go get github.com/poteto0/poteto@v0.26.5 +go get github.com/poteto-go/poteto@v0.26.5 go mod tidy ``` ## Example App For Poteto -https://github.com/poteto0/poteto-sample-api/tree/main +https://github.com/poteto-go/poteto-sample-api/tree/main or `/examples` @@ -24,7 +24,7 @@ It will be moved to other repo. We support cli tool. But if you doesn't like it, you can create poteto-app w/o cli of course. ```sh -go install github.com/poteto0/poteto/cmd/poteto-cli@v0.26.5 +go install github.com/poteto-go/poteto/cmd/poteto-cli@v0.26.5 ``` Create file. @@ -120,8 +120,8 @@ package main import ( "net/http" - "github.com/poteto0/poteto" - "github.com/poteto0/poteto/middleware" + "github.com/poteto-go/poteto" + "github.com/poteto-go/poteto/middleware" ) func main() { diff --git a/banner.go b/banner.go index 4fd66f1..eefa47e 100644 --- a/banner.go +++ b/banner.go @@ -19,6 +19,6 @@ const Banner = ` ⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀⡀ Simple Web Framework For GoLang -https://github.com/poteto0/poteto +https://github.com/poteto-go/poteto =================================================== ` diff --git a/binder.go b/binder.go index 56e9dba..9cbf563 100644 --- a/binder.go +++ b/binder.go @@ -3,7 +3,7 @@ package poteto import ( "strings" - "github.com/poteto0/poteto/constant" + "github.com/poteto-go/poteto/constant" ) type Binder interface { diff --git a/binder_test.go b/binder_test.go index 9e816b5..7505149 100644 --- a/binder_test.go +++ b/binder_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/poteto0/poteto/constant" + "github.com/poteto-go/poteto/constant" ) func TestBind(t *testing.T) { diff --git a/cmd/cmd-new/cmd_new.go b/cmd/cmd-new/cmd_new.go index 4fef804..3a54d11 100644 --- a/cmd/cmd-new/cmd_new.go +++ b/cmd/cmd-new/cmd_new.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - "github.com/poteto0/poteto/cmd/engine" + "github.com/poteto-go/poteto/cmd/engine" "github.com/manifoldco/promptui" ) @@ -51,7 +51,7 @@ func CommandNew() { func help() { fmt.Println("poteto-cli new: support creating poteto-app") - fmt.Println("https://github.com/poteto0/poteto") + fmt.Println("https://github.com/poteto-go/poteto") fmt.Println("========================================") fmt.Println("") fmt.Println("Options:") diff --git a/cmd/cmd-new/cmd_new_test.go b/cmd/cmd-new/cmd_new_test.go index 1a2384b..01e3a51 100644 --- a/cmd/cmd-new/cmd_new_test.go +++ b/cmd/cmd-new/cmd_new_test.go @@ -7,7 +7,7 @@ import ( "bou.ke/monkey" "github.com/manifoldco/promptui" - "github.com/poteto0/poteto/cmd/engine" + "github.com/poteto-go/poteto/cmd/engine" ) func TestCommandNew(t *testing.T) { diff --git a/cmd/cmd-run/cmd_run.go b/cmd/cmd-run/cmd_run.go index 7b513f7..0d7dd1b 100644 --- a/cmd/cmd-run/cmd_run.go +++ b/cmd/cmd-run/cmd_run.go @@ -4,9 +4,9 @@ import ( "fmt" "os" - "github.com/poteto0/poteto/cmd/core" - "github.com/poteto0/poteto/cmd/engine" - "github.com/poteto0/poteto/utils" + "github.com/poteto-go/poteto/cmd/core" + "github.com/poteto-go/poteto/cmd/engine" + "github.com/poteto-go/poteto/utils" ) func loadOption() core.RunnerOption { @@ -55,7 +55,7 @@ func CommandRun() { func help() { fmt.Println("poteto-cli run: hot-reload run api server") - fmt.Println("https://github.com/poteto0/poteto") + fmt.Println("https://github.com/poteto-go/poteto") fmt.Println("========================================") fmt.Println("") fmt.Println("Options:") diff --git a/cmd/cmd-run/cmd_run_test.go b/cmd/cmd-run/cmd_run_test.go index a81a8f6..c38fb4c 100644 --- a/cmd/cmd-run/cmd_run_test.go +++ b/cmd/cmd-run/cmd_run_test.go @@ -5,8 +5,8 @@ import ( "testing" "bou.ke/monkey" - "github.com/poteto0/poteto/cmd/core" - "github.com/poteto0/poteto/cmd/engine" + "github.com/poteto-go/poteto/cmd/core" + "github.com/poteto-go/poteto/cmd/engine" ) func TestHelp(t *testing.T) { diff --git a/cmd/core/runner_client.go b/cmd/core/runner_client.go index ec5165d..54c0c44 100644 --- a/cmd/core/runner_client.go +++ b/cmd/core/runner_client.go @@ -16,7 +16,7 @@ import ( "github.com/fatih/color" "github.com/fsnotify/fsnotify" - "github.com/poteto0/poteto/utils" + "github.com/poteto-go/poteto/utils" ) type RunnerOption struct { diff --git a/cmd/engine/engine_new.go b/cmd/engine/engine_new.go index 241f05d..3eaea02 100644 --- a/cmd/engine/engine_new.go +++ b/cmd/engine/engine_new.go @@ -7,8 +7,8 @@ import ( "path/filepath" "strings" - "github.com/poteto0/poteto/cmd/template" - "github.com/poteto0/poteto/utils" + "github.com/poteto-go/poteto/cmd/template" + "github.com/poteto-go/poteto/utils" ) type EngineNewParam struct { diff --git a/cmd/engine/engine_new_test.go b/cmd/engine/engine_new_test.go index b945e7e..e9b481c 100644 --- a/cmd/engine/engine_new_test.go +++ b/cmd/engine/engine_new_test.go @@ -8,7 +8,7 @@ import ( "testing" "bou.ke/monkey" - "github.com/poteto0/poteto/cmd/template" + "github.com/poteto-go/poteto/cmd/template" ) func TestRunNew(t *testing.T) { diff --git a/cmd/engine/engine_run.go b/cmd/engine/engine_run.go index 81251bb..a599f8e 100644 --- a/cmd/engine/engine_run.go +++ b/cmd/engine/engine_run.go @@ -5,7 +5,7 @@ import ( "os" "os/signal" - "github.com/poteto0/poteto/cmd/core" + "github.com/poteto-go/poteto/cmd/core" ) func RunRun(option core.RunnerOption) error { diff --git a/cmd/engine/engine_run_test.go b/cmd/engine/engine_run_test.go index c9c8c3c..bbe51c9 100644 --- a/cmd/engine/engine_run_test.go +++ b/cmd/engine/engine_run_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/poteto0/poteto/cmd/core" + "github.com/poteto-go/poteto/cmd/core" ) func TestSuccessRunRun(t *testing.T) { diff --git a/cmd/poteto-cli/poteto-cli.go b/cmd/poteto-cli/poteto-cli.go index 0951008..fc23fc9 100644 --- a/cmd/poteto-cli/poteto-cli.go +++ b/cmd/poteto-cli/poteto-cli.go @@ -4,8 +4,8 @@ import ( "fmt" "os" - cmdnew "github.com/poteto0/poteto/cmd/cmd-new" - cmdrun "github.com/poteto0/poteto/cmd/cmd-run" + cmdnew "github.com/poteto-go/poteto/cmd/cmd-new" + cmdrun "github.com/poteto-go/poteto/cmd/cmd-run" ) func main() { @@ -38,7 +38,7 @@ func main() { func help() { fmt.Println("poteto-cli: support creating poteto-app") - fmt.Println("https://github.com/poteto0/poteto") + fmt.Println("https://github.com/poteto-go/poteto") fmt.Println("========================================") fmt.Println("") fmt.Println("Command: poteto-cli [command]") diff --git a/cmd/poteto-cli/poteto-cli_test.go b/cmd/poteto-cli/poteto-cli_test.go index 134c484..9b22dd7 100644 --- a/cmd/poteto-cli/poteto-cli_test.go +++ b/cmd/poteto-cli/poteto-cli_test.go @@ -5,8 +5,8 @@ import ( "testing" "bou.ke/monkey" - cmdnew "github.com/poteto0/poteto/cmd/cmd-new" - cmdrun "github.com/poteto0/poteto/cmd/cmd-run" + cmdnew "github.com/poteto-go/poteto/cmd/cmd-new" + cmdrun "github.com/poteto-go/poteto/cmd/cmd-run" ) func TestPotetoCliMai(t *testing.T) { diff --git a/cmd/template/defalut.go b/cmd/template/defalut.go index 6e891e0..301a509 100644 --- a/cmd/template/defalut.go +++ b/cmd/template/defalut.go @@ -6,8 +6,8 @@ package main import ( "net/http" - "github.com/poteto0/poteto" - "github.com/poteto0/poteto/middleware" + "github.com/poteto-go/poteto" + "github.com/poteto-go/poteto/middleware" ) func main() { diff --git a/cmd/template/fast.go b/cmd/template/fast.go index 94cd3fc..1236f1c 100644 --- a/cmd/template/fast.go +++ b/cmd/template/fast.go @@ -6,8 +6,8 @@ package main import ( "net/http" - "github.com/poteto0/poteto" - "github.com/poteto0/poteto/middleware" + "github.com/poteto-go/poteto" + "github.com/poteto-go/poteto/middleware" ) func main() { diff --git a/cmd/template/jsonrpc.go b/cmd/template/jsonrpc.go index e5f9f64..67345b5 100644 --- a/cmd/template/jsonrpc.go +++ b/cmd/template/jsonrpc.go @@ -6,7 +6,7 @@ package main import ( "net/http" - "github.com/poteto0/poteto" + "github.com/poteto-go/poteto" ) type ( diff --git a/cmd/template/jsonrpc_fast.go b/cmd/template/jsonrpc_fast.go index 27ab51d..9e32509 100644 --- a/cmd/template/jsonrpc_fast.go +++ b/cmd/template/jsonrpc_fast.go @@ -6,7 +6,7 @@ package main import ( "net/http" - "github.com/poteto0/poteto" + "github.com/poteto-go/poteto" ) type ( diff --git a/context.go b/context.go index d4f67da..2e86787 100644 --- a/context.go +++ b/context.go @@ -9,8 +9,8 @@ import ( "github.com/goccy/go-json" "github.com/google/uuid" "github.com/harakeishi/gats" - "github.com/poteto0/poteto/constant" - "github.com/poteto0/poteto/utils" + "github.com/poteto-go/poteto/constant" + "github.com/poteto-go/poteto/utils" ) type Context interface { diff --git a/context_test.go b/context_test.go index 688dace..fe763ca 100644 --- a/context_test.go +++ b/context_test.go @@ -13,7 +13,7 @@ import ( "bou.ke/monkey" "github.com/google/uuid" - "github.com/poteto0/poteto/constant" + "github.com/poteto-go/poteto/constant" ) func TestJSON(t *testing.T) { diff --git a/examples/api/go.mod b/examples/api/go.mod index b69489f..7aea911 100644 --- a/examples/api/go.mod +++ b/examples/api/go.mod @@ -2,7 +2,7 @@ module simple-api go 1.21.8 -require github.com/poteto0/poteto v0.26.0 +require github.com/poteto-go/poteto v0.26.0 require ( github.com/fatih/color v1.18.0 // indirect diff --git a/examples/api/go.sum b/examples/api/go.sum index 7d8e320..f4f8e88 100644 --- a/examples/api/go.sum +++ b/examples/api/go.sum @@ -17,8 +17,8 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/poteto0/poteto v0.26.0 h1:rSlTAsRUwehp6KEgEAOpoP17di1bpl6av96ywx3Awfg= -github.com/poteto0/poteto v0.26.0/go.mod h1:wEYJSH6npJ/wjRh2ux5/49VMtVaTsQKcxo+rfdIQIpU= +github.com/poteto-go/poteto v0.26.0 h1:rSlTAsRUwehp6KEgEAOpoP17di1bpl6av96ywx3Awfg= +github.com/poteto-go/poteto v0.26.0/go.mod h1:wEYJSH6npJ/wjRh2ux5/49VMtVaTsQKcxo+rfdIQIpU= github.com/ybbus/jsonrpc/v3 v3.1.5 h1:0cC/QzS8OCuXYqqDbYnKKhsEe+IZLrNlDx8KPCieeW0= github.com/ybbus/jsonrpc/v3 v3.1.5/go.mod h1:U1QbyNfL5Pvi2roT0OpRbJeyvGxfWYSgKJHjxWdAEeE= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/examples/api/main.go b/examples/api/main.go index 6b04bfe..9db87c6 100644 --- a/examples/api/main.go +++ b/examples/api/main.go @@ -3,8 +3,8 @@ package main import ( "net/http" - "github.com/poteto0/poteto" - "github.com/poteto0/poteto/middleware" + "github.com/poteto-go/poteto" + "github.com/poteto-go/poteto/middleware" ) func main() { diff --git a/examples/fast-api/go.mod b/examples/fast-api/go.mod index fe98a07..f771e23 100644 --- a/examples/fast-api/go.mod +++ b/examples/fast-api/go.mod @@ -2,7 +2,7 @@ module simple-api-fast go 1.21.8 -require github.com/poteto0/poteto v0.26.0 +require github.com/poteto-go/poteto v0.26.0 require ( github.com/fatih/color v1.18.0 // indirect diff --git a/examples/fast-api/go.sum b/examples/fast-api/go.sum index 7d8e320..f4f8e88 100644 --- a/examples/fast-api/go.sum +++ b/examples/fast-api/go.sum @@ -17,8 +17,8 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/poteto0/poteto v0.26.0 h1:rSlTAsRUwehp6KEgEAOpoP17di1bpl6av96ywx3Awfg= -github.com/poteto0/poteto v0.26.0/go.mod h1:wEYJSH6npJ/wjRh2ux5/49VMtVaTsQKcxo+rfdIQIpU= +github.com/poteto-go/poteto v0.26.0 h1:rSlTAsRUwehp6KEgEAOpoP17di1bpl6av96ywx3Awfg= +github.com/poteto-go/poteto v0.26.0/go.mod h1:wEYJSH6npJ/wjRh2ux5/49VMtVaTsQKcxo+rfdIQIpU= github.com/ybbus/jsonrpc/v3 v3.1.5 h1:0cC/QzS8OCuXYqqDbYnKKhsEe+IZLrNlDx8KPCieeW0= github.com/ybbus/jsonrpc/v3 v3.1.5/go.mod h1:U1QbyNfL5Pvi2roT0OpRbJeyvGxfWYSgKJHjxWdAEeE= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/examples/fast-api/main.go b/examples/fast-api/main.go index fb1bd90..1e4fa7f 100644 --- a/examples/fast-api/main.go +++ b/examples/fast-api/main.go @@ -3,8 +3,8 @@ package main import ( "net/http" - "github.com/poteto0/poteto" - "github.com/poteto0/poteto/middleware" + "github.com/poteto-go/poteto" + "github.com/poteto-go/poteto/middleware" ) func main() { diff --git a/examples/jsonrpc/go.mod b/examples/jsonrpc/go.mod index c679739..22ff226 100644 --- a/examples/jsonrpc/go.mod +++ b/examples/jsonrpc/go.mod @@ -2,7 +2,7 @@ module jsonrpc go 1.21.8 -require github.com/poteto0/poteto v0.26.0 +require github.com/poteto-go/poteto v0.26.0 require ( github.com/fatih/color v1.18.0 // indirect diff --git a/examples/jsonrpc/go.sum b/examples/jsonrpc/go.sum index 7d8e320..f4f8e88 100644 --- a/examples/jsonrpc/go.sum +++ b/examples/jsonrpc/go.sum @@ -17,8 +17,8 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/poteto0/poteto v0.26.0 h1:rSlTAsRUwehp6KEgEAOpoP17di1bpl6av96ywx3Awfg= -github.com/poteto0/poteto v0.26.0/go.mod h1:wEYJSH6npJ/wjRh2ux5/49VMtVaTsQKcxo+rfdIQIpU= +github.com/poteto-go/poteto v0.26.0 h1:rSlTAsRUwehp6KEgEAOpoP17di1bpl6av96ywx3Awfg= +github.com/poteto-go/poteto v0.26.0/go.mod h1:wEYJSH6npJ/wjRh2ux5/49VMtVaTsQKcxo+rfdIQIpU= github.com/ybbus/jsonrpc/v3 v3.1.5 h1:0cC/QzS8OCuXYqqDbYnKKhsEe+IZLrNlDx8KPCieeW0= github.com/ybbus/jsonrpc/v3 v3.1.5/go.mod h1:U1QbyNfL5Pvi2roT0OpRbJeyvGxfWYSgKJHjxWdAEeE= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/examples/jsonrpc/main.go b/examples/jsonrpc/main.go index b2e006f..1b3a5ba 100644 --- a/examples/jsonrpc/main.go +++ b/examples/jsonrpc/main.go @@ -3,7 +3,7 @@ package main import ( "net/http" - "github.com/poteto0/poteto" + "github.com/poteto-go/poteto" ) type ( diff --git a/go.mod b/go.mod index 612257e..5cec8af 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/poteto0/poteto +module github.com/poteto-go/poteto go 1.21.8 diff --git a/http_param.go b/http_param.go index 9502c8d..ea16db6 100644 --- a/http_param.go +++ b/http_param.go @@ -2,7 +2,7 @@ package poteto import ( "github.com/goccy/go-json" - "github.com/poteto0/poteto/constant" + "github.com/poteto-go/poteto/constant" ) type ParamUnit struct { diff --git a/http_param_test.go b/http_param_test.go index e1116f6..29f59a4 100644 --- a/http_param_test.go +++ b/http_param_test.go @@ -6,7 +6,7 @@ import ( "bou.ke/monkey" "github.com/goccy/go-json" - "github.com/poteto0/poteto/constant" + "github.com/poteto-go/poteto/constant" ) func TestAddAndGetParam(t *testing.T) { diff --git a/ip_handler.go b/ip_handler.go index a40e49c..50d73a3 100644 --- a/ip_handler.go +++ b/ip_handler.go @@ -5,7 +5,7 @@ import ( "net" "strings" - "github.com/poteto0/poteto/constant" + "github.com/poteto-go/poteto/constant" ) type ipHandler struct { diff --git a/ip_handler_test.go b/ip_handler_test.go index 59e20f0..81a0fd2 100644 --- a/ip_handler_test.go +++ b/ip_handler_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/poteto0/poteto/constant" + "github.com/poteto-go/poteto/constant" ) func TestCanTrust(t *testing.T) { diff --git a/middleware/README.md b/middleware/README.md index d65b067..0b2a004 100644 --- a/middleware/README.md +++ b/middleware/README.md @@ -1,7 +1,7 @@ # Middleware Perhaps the wiki is the most up-to-date. -https://github.com/poteto0/poteto/wiki/Middleware +https://github.com/poteto-go/poteto/wiki/Middleware ## middleware list @@ -21,8 +21,8 @@ package main import ( "net/http" - "github.com/poteto0/poteto" - "github.com/poteto0/poteto/middleware" + "github.com/poteto-go/poteto" + "github.com/poteto-go/poteto/middleware" ) func main() { diff --git a/middleware/camara.go b/middleware/camara.go index 134a355..cd7b947 100644 --- a/middleware/camara.go +++ b/middleware/camara.go @@ -1,8 +1,8 @@ package middleware import ( - "github.com/poteto0/poteto" - "github.com/poteto0/poteto/constant" + "github.com/poteto-go/poteto" + "github.com/poteto-go/poteto/constant" ) type CamaraConfig struct { diff --git a/middleware/camara_test.go b/middleware/camara_test.go index c14fcb4..c6c99c2 100644 --- a/middleware/camara_test.go +++ b/middleware/camara_test.go @@ -5,8 +5,8 @@ import ( "net/http/httptest" "testing" - "github.com/poteto0/poteto" - "github.com/poteto0/poteto/constant" + "github.com/poteto-go/poteto" + "github.com/poteto-go/poteto/constant" ) func TestCamaraWithConfigByDefault(t *testing.T) { diff --git a/middleware/cors.go b/middleware/cors.go index 82dbb1b..6cc82e7 100644 --- a/middleware/cors.go +++ b/middleware/cors.go @@ -4,8 +4,8 @@ import ( "net/http" "regexp" - "github.com/poteto0/poteto" - "github.com/poteto0/poteto/constant" + "github.com/poteto-go/poteto" + "github.com/poteto-go/poteto/constant" ) type CORSConfig struct { diff --git a/middleware/cors_test.go b/middleware/cors_test.go index f093202..58b503e 100644 --- a/middleware/cors_test.go +++ b/middleware/cors_test.go @@ -6,8 +6,8 @@ import ( "net/http/httptest" "testing" - "github.com/poteto0/poteto" - "github.com/poteto0/poteto/constant" + "github.com/poteto-go/poteto" + "github.com/poteto-go/poteto/constant" ) type TestVal struct { diff --git a/middleware/jws.go b/middleware/jws.go index b281ce9..5ae38da 100644 --- a/middleware/jws.go +++ b/middleware/jws.go @@ -6,8 +6,8 @@ import ( "strings" "github.com/golang-jwt/jwt/v5" - "github.com/poteto0/poteto" - "github.com/poteto0/poteto/constant" + "github.com/poteto-go/poteto" + "github.com/poteto-go/poteto/constant" ) type potetoJWSConfig struct { diff --git a/middleware/jws_test.go b/middleware/jws_test.go index b4f6926..283a6ae 100644 --- a/middleware/jws_test.go +++ b/middleware/jws_test.go @@ -10,9 +10,9 @@ import ( "bou.ke/monkey" "github.com/golang-jwt/jwt/v5" - "github.com/poteto0/poteto" - "github.com/poteto0/poteto/constant" - "github.com/poteto0/poteto/utils" + "github.com/poteto-go/poteto" + "github.com/poteto-go/poteto/constant" + "github.com/poteto-go/poteto/utils" ) type jwtUserClaims struct { diff --git a/middleware/request_logger.go b/middleware/request_logger.go index 83a1554..2ac5074 100644 --- a/middleware/request_logger.go +++ b/middleware/request_logger.go @@ -4,8 +4,8 @@ import ( "net/http" "time" - "github.com/poteto0/poteto" - "github.com/poteto0/poteto/constant" + "github.com/poteto-go/poteto" + "github.com/poteto-go/poteto/constant" ) // Example for Logrus (https://github.com/sirupsen/logrus) diff --git a/middleware/request_logger_test.go b/middleware/request_logger_test.go index 9cfa559..2fd7362 100644 --- a/middleware/request_logger_test.go +++ b/middleware/request_logger_test.go @@ -5,7 +5,7 @@ import ( "net/http/httptest" "testing" - "github.com/poteto0/poteto" + "github.com/poteto-go/poteto" ) func TestRequestLogger(t *testing.T) { diff --git a/middleware/timeout.go b/middleware/timeout.go index 5337d8b..6c86467 100644 --- a/middleware/timeout.go +++ b/middleware/timeout.go @@ -5,7 +5,7 @@ import ( "net/http" "time" - "github.com/poteto0/poteto" + "github.com/poteto-go/poteto" ) type TimeoutConfig struct { diff --git a/middleware/timeout_test.go b/middleware/timeout_test.go index 86aef73..4595fc7 100644 --- a/middleware/timeout_test.go +++ b/middleware/timeout_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/poteto0/poteto" + "github.com/poteto-go/poteto" ) type ret struct { diff --git a/middleware/utils.go b/middleware/utils.go index 0a72e12..121368c 100644 --- a/middleware/utils.go +++ b/middleware/utils.go @@ -4,7 +4,7 @@ import ( "regexp" "strings" - "github.com/poteto0/poteto/constant" + "github.com/poteto-go/poteto/constant" ) // EX: https://example.com:* => ^https://example\.com:.*$ diff --git a/middleware/utils_test.go b/middleware/utils_test.go index 3008601..c5ae008 100644 --- a/middleware/utils_test.go +++ b/middleware/utils_test.go @@ -5,7 +5,7 @@ import ( "net/http" "testing" - "github.com/poteto0/poteto/utils" + "github.com/poteto-go/poteto/utils" ) func TestWrapRegExp(t *testing.T) { diff --git a/poteto.go b/poteto.go index 247c30a..5f15f80 100644 --- a/poteto.go +++ b/poteto.go @@ -10,8 +10,8 @@ import ( stdContext "context" "github.com/fatih/color" - "github.com/poteto0/poteto/constant" - "github.com/poteto0/poteto/utils" + "github.com/poteto-go/poteto/constant" + "github.com/poteto-go/poteto/utils" ) type Poteto interface { diff --git a/poteto_rpc.go b/poteto_rpc.go index 806ae26..874b9ea 100644 --- a/poteto_rpc.go +++ b/poteto_rpc.go @@ -6,7 +6,7 @@ import ( "strings" "github.com/goccy/go-json" - "github.com/poteto0/poteto/utils" + "github.com/poteto-go/poteto/utils" ) // TODO: error status code diff --git a/poteto_rpc_test.go b/poteto_rpc_test.go index 61c8a47..3b8ce82 100644 --- a/poteto_rpc_test.go +++ b/poteto_rpc_test.go @@ -9,7 +9,7 @@ import ( "time" "github.com/goccy/go-json" - "github.com/poteto0/poteto/constant" + "github.com/poteto-go/poteto/constant" "github.com/ybbus/jsonrpc/v3" ) diff --git a/response.go b/response.go index 234558a..c711bd0 100644 --- a/response.go +++ b/response.go @@ -3,7 +3,7 @@ package poteto import ( "net/http" - "github.com/poteto0/poteto/utils" + "github.com/poteto-go/poteto/utils" ) type Response interface { diff --git a/route.go b/route.go index 71db2a0..4e0c74f 100644 --- a/route.go +++ b/route.go @@ -5,8 +5,8 @@ import ( "strings" "github.com/fatih/color" - "github.com/poteto0/poteto/constant" - "github.com/poteto0/poteto/utils" + "github.com/poteto-go/poteto/constant" + "github.com/poteto-go/poteto/utils" ) type Route interface { @@ -42,7 +42,7 @@ func (r *route) Search(path string) (*route, []ParamUnit) { } // optimized router insert - // https://github.com/poteto0/poteto/issues/113 + // https://github.com/poteto-go/poteto/issues/113 for { id := strings.Index(rightPath, "/") if id < 0 { @@ -81,7 +81,7 @@ func (r *route) Insert(path string, handler HandlerFunc) { param := "" // optimized router insert - // https://github.com/poteto0/poteto/issues/113 + // https://github.com/poteto-go/poteto/issues/113 for { id := strings.Index(rightPath, "/") if id < 0 { // means last diff --git a/run_test.sh b/run_test.sh index 13da004..10200e7 100644 --- a/run_test.sh +++ b/run_test.sh @@ -1,12 +1,12 @@ #!bin/bash echo "start test" # noinlineによるテスト実行 -# https://github.com/poteto0/poteto/issues/169 +# https://github.com/poteto-go/poteto/issues/169 go test ./... -coverprofile cover.out.tmp -bench . -benchtime 100000x go test ./... -cover -gcflags=all=-l echo "remove" -cat cover.out.tmp | grep -v "github.com/poteto0/poteto/cmd/template" > cover2.out.tmp -cat cover2.out.tmp | grep -v "github.com/poteto0/poteto/constant" > coverage.txt +cat cover.out.tmp | grep -v "github.com/poteto-go/poteto/cmd/template" > cover2.out.tmp +cat cover2.out.tmp | grep -v "github.com/poteto-go/poteto/constant" > coverage.txt echo "report" tool cover -func cover.out