Skip to content

Commit e43ed9f

Browse files
committed
refactor: rename module from tigerwill90/fox to fox-toolkit/fox
1 parent 5ccf708 commit e43ed9f

28 files changed

Lines changed: 73 additions & 75 deletions

README.md

Lines changed: 32 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Fox
22

3-
<img align="right" width="159px" src="https://raw.githubusercontent.com/tigerwill90/fox/refs/heads/static/fox_logo.png">
3+
<img align="right" width="159px" src="https://raw.githubusercontent.com/fox-toolkit/fox/refs/heads/static/fox_logo.png">
44

5-
[![Go Reference](https://pkg.go.dev/badge/github.com/tigerwill90/fox.svg)](https://pkg.go.dev/github.com/tigerwill90/fox)
6-
[![tests](https://github.com/tigerwill90/fox/actions/workflows/tests.yaml/badge.svg)](https://github.com/tigerwill90/fox/actions?query=workflow%3Atests)
7-
[![Go Report Card](https://goreportcard.com/badge/github.com/tigerwill90/fox)](https://goreportcard.com/report/github.com/tigerwill90/fox)
8-
[![codecov](https://codecov.io/gh/tigerwill90/fox/branch/master/graph/badge.svg?token=09nfd7v0Bl)](https://codecov.io/gh/tigerwill90/fox)
9-
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/tigerwill90/fox)
10-
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/tigerwill90/fox)
5+
[![Go Reference](https://pkg.go.dev/badge/github.com/fox-toolkit/fox.svg)](https://pkg.go.dev/github.com/fox-toolkit/fox)
6+
[![tests](https://github.com/fox-toolkit/fox/actions/workflows/tests.yaml/badge.svg)](https://github.com/fox-toolkit/fox/actions?query=workflow%3Atests)
7+
[![Go Report Card](https://goreportcard.com/badge/github.com/fox-toolkit/fox)](https://goreportcard.com/report/github.com/fox-toolkit/fox)
8+
[![codecov](https://codecov.io/gh/fox-toolkit/fox/branch/master/graph/badge.svg?token=09nfd7v0Bl)](https://codecov.io/gh/fox-toolkit/fox)
9+
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/fox-toolkit/fox)
10+
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/fox-toolkit/fox)
1111

1212
Fox is a lightweight and high performance HTTP request router for [Go](https://go.dev/), designed for building reverse proxies,
1313
API gateways, or other applications that require managing routes at runtime based on configuration changes or external events.
@@ -37,7 +37,7 @@ the canonical path, or enforcing strict matching based on your needs.
3737

3838
**Client IP Derivation:** Accurately determine the "real" client IP address using best practices tailored to your network topology.
3939

40-
**Rich middleware ecosystem:** Fox offers a robust ecosystem of prebuilt, high-quality middlewares, ready to integrate into your application.
40+
**Growing middleware ecosystem:** Fox's middleware ecosystem is still limited, but standard `http.Handler` middleware are fully compatible. Contributions are welcome!
4141

4242
---
4343
* [Getting started](#getting-started)
@@ -74,7 +74,7 @@ the canonical path, or enforcing strict matching based on your needs.
7474
#### Install
7575
With a [correctly configured](https://go.dev/doc/install#testing) Go toolchain:
7676
```shell
77-
go get -u github.com/tigerwill90/fox
77+
go get -u github.com/fox-toolkit/fox
7878
```
7979

8080
#### Basic example
@@ -87,7 +87,7 @@ import (
8787
"log"
8888
"net/http"
8989

90-
"github.com/tigerwill90/fox"
90+
"github.com/fox-toolkit/fox"
9191
)
9292

9393
func HelloServer(c *fox.Context) {
@@ -107,8 +107,8 @@ func main() {
107107

108108
#### Named parameters
109109
Routes can include named parameters using curly braces `{name}` to match exactly one non-empty route segment. The matching
110-
segment are recorder as [Param](https://pkg.go.dev/github.com/tigerwill90/fox#Param) and accessible via the
111-
[Context](https://pkg.go.dev/github.com/tigerwill90/fox#Context). Named parameters are supported anywhere in
110+
segment are recorder as [Param](https://pkg.go.dev/github.com/fox-toolkit/fox#Param) and accessible via the
111+
[Context](https://pkg.go.dev/github.com/fox-toolkit/fox#Context). Named parameters are supported anywhere in
112112
the route, but only one parameter is allowed per segment (or hostname label) and must appear at the end of the segment.
113113

114114
````
@@ -149,7 +149,7 @@ Pattern /products/{name:[A-Za-z]+}
149149
#### Named Wildcards (Catch-all)
150150
Named wildcard start with a plus sign `+` followed by a name `{param}` and match any sequence of characters
151151
including slashes, but cannot match an empty string. The matching segment are also accessible via
152-
[Context](https://pkg.go.dev/github.com/tigerwill90/fox#Context). Catch-all parameters are supported anywhere in the route,
152+
[Context](https://pkg.go.dev/github.com/fox-toolkit/fox#Context). Catch-all parameters are supported anywhere in the route,
153153
but only one parameter is allowed per segment (or hostname label) and must appear at the end of the segment.
154154
Consecutive catch-all parameter are not allowed.
155155

@@ -368,7 +368,7 @@ import (
368368
"net/http"
369369
"strings"
370370

371-
"github.com/tigerwill90/fox"
371+
"github.com/fox-toolkit/fox"
372372
)
373373

374374
type Data struct {
@@ -502,7 +502,7 @@ import (
502502
"net/http"
503503
"time"
504504

505-
"github.com/tigerwill90/fox"
505+
"github.com/fox-toolkit/fox"
506506
)
507507

508508
func Logger(next fox.HandlerFunc) fox.HandlerFunc {
@@ -552,11 +552,9 @@ f.MustAdd(fox.MethodGet, "/foo", SomeOtherHandler)
552552
````
553553

554554
### Official middlewares
555-
* [tigerwill90/otelfox](https://github.com/tigerwill90/otelfox): Distributed tracing with [OpenTelemetry](https://opentelemetry.io/)
556-
* [tigerwill90/foxdump](https://github.com/tigerwill90/foxdump): Body dump middleware for capturing requests and responses payload.
557-
* [tigerwill90/foxtimeout](https://github.com/tigerwill90/foxtimeout): `http.TimeoutHandler` middleware optimized for Fox.
558-
* [tigerwill90/foxwaf](https://github.com/tigerwill90/foxwaf): Coraza WAF middleware (experimental).
559-
* [tigerwill90/foxgeoip](https://github.com/tigerwill90/foxgeoip): Block requests using GeoIP data based on client IP (experimental).
555+
* [fox-toolkit/otelfox](https://github.com/fox-toolkit/otelfox): Distributed tracing with [OpenTelemetry](https://opentelemetry.io/)
556+
* [fox-toolkit/foxtimeout](https://github.com/fox-toolkit/foxtimeout): `http.TimeoutHandler` middleware optimized for Fox.
557+
* [fox-toolkit/foxwaf](https://github.com/fox-toolkit/foxwaf): Coraza WAF middleware (experimental).
560558

561559
## Working with http.Handler
562560
Fox itself implements the `http.Handler` interface which make easy to chain any compatible middleware before the router. Moreover, the router
@@ -610,7 +608,7 @@ import (
610608
"net/http"
611609

612610
"github.com/jub0bs/cors"
613-
"github.com/tigerwill90/fox"
611+
"github.com/fox-toolkit/fox"
614612
)
615613

616614
func main() {
@@ -649,7 +647,7 @@ import (
649647
"net/http"
650648

651649
"github.com/jub0bs/cors"
652-
"github.com/tigerwill90/fox"
650+
"github.com/fox-toolkit/fox"
653651
)
654652

655653
func main() {
@@ -691,16 +689,16 @@ The resolver used must be chosen and tuned for your network configuration. This
691689
an error and if it does, it should be treated as an application issue or a misconfiguration, rather than defaulting to an
692690
untrustworthy IP.
693691

694-
The sub-package `github.com/tigerwill90/fox/clientip` provides a set of best practices resolvers that should cover most use cases.
692+
The sub-package `github.com/fox-toolkit/fox/clientip` provides a set of best practices resolvers that should cover most use cases.
695693

696694
````go
697695
package main
698696

699697
import (
700698
"fmt"
701699

702-
"github.com/tigerwill90/fox"
703-
"github.com/tigerwill90/fox/clientip"
700+
"github.com/fox-toolkit/fox"
701+
"github.com/fox-toolkit/fox/clientip"
704702
)
705703

706704
func main() {
@@ -886,13 +884,13 @@ BenchmarkPat_GithubAll 424 2899405 ns/op 1843501
886884
```
887885

888886
## Road to v1
889-
- [x] [Update route syntax](https://github.com/tigerwill90/fox/pull/10#issue-1643728309) @v0.6.0
890-
- [x] [Route overlapping](https://github.com/tigerwill90/fox/pull/9#issue-1642887919) @v0.7.0
891-
- [x] [Route overlapping (catch-all and params)](https://github.com/tigerwill90/fox/pull/24#issue-1784686061) @v0.10.0
892-
- [x] [Ignore trailing slash](https://github.com/tigerwill90/fox/pull/32), [Builtin Logger Middleware](https://github.com/tigerwill90/fox/pull/33), [Client IP Derivation](https://github.com/tigerwill90/fox/pull/33) @v0.14.0
893-
- [x] [Support infix wildcard](https://github.com/tigerwill90/fox/pull/46), [Support hostname routing](https://github.com/tigerwill90/fox/pull/48), [Support ACID transaction](https://github.com/tigerwill90/fox/pull/49) @v0.18.0
894-
- [x] [Support regexp params](https://github.com/tigerwill90/fox/pull/68) @v0.25.0
895-
- [x] [Support route matchers](https://github.com/tigerwill90/fox/pull/69), [Support SubRouter](https://github.com/tigerwill90/fox/pull/70), [Method-less tree](https://github.com/tigerwill90/fox/pull/71) @v0.26.0
887+
- [x] [Update route syntax](https://github.com/fox-toolkit/fox/pull/10#issue-1643728309) @v0.6.0
888+
- [x] [Route overlapping](https://github.com/fox-toolkit/fox/pull/9#issue-1642887919) @v0.7.0
889+
- [x] [Route overlapping (catch-all and params)](https://github.com/fox-toolkit/fox/pull/24#issue-1784686061) @v0.10.0
890+
- [x] [Ignore trailing slash](https://github.com/fox-toolkit/fox/pull/32), [Builtin Logger Middleware](https://github.com/fox-toolkit/fox/pull/33), [Client IP Derivation](https://github.com/fox-toolkit/fox/pull/33) @v0.14.0
891+
- [x] [Support infix wildcard](https://github.com/fox-toolkit/fox/pull/46), [Support hostname routing](https://github.com/fox-toolkit/fox/pull/48), [Support ACID transaction](https://github.com/fox-toolkit/fox/pull/49) @v0.18.0
892+
- [x] [Support regexp params](https://github.com/fox-toolkit/fox/pull/68) @v0.25.0
893+
- [x] [Support route matchers](https://github.com/fox-toolkit/fox/pull/69), [Support SubRouter](https://github.com/fox-toolkit/fox/pull/70), [Method-less tree](https://github.com/fox-toolkit/fox/pull/71) @v0.26.0
896894
- [ ] Programmatic error handling
897895
- [ ] Improving performance and polishing
898896
- [ ] Stabilizing API
@@ -906,8 +904,8 @@ allowing it to serve as a building block for implementing your own "batteries in
906904

907905
Fox is licensed under the **Apache License 2.0**. See [`LICENSE.txt`](./LICENSE.txt) for details.
908906

909-
The [**Fox logo**](https://github.com/tigerwill90/fox/blob/static/fox_logo.png) is licensed separately under [**CC BY-NC-ND 4.0**](https://creativecommons.org/licenses/by-nc-nd/4.0/?ref=chooser-v1).
910-
See [`LICENSE-fox-logo.txt`](https://github.com/tigerwill90/fox/blob/static/LICENSE-fox-logo.txt) for details.
907+
The [**Fox logo**](https://github.com/fox-toolkit/fox/blob/static/fox_logo.png) is licensed separately under [**CC BY-NC-ND 4.0**](https://creativecommons.org/licenses/by-nc-nd/4.0/?ref=chooser-v1).
908+
See [`LICENSE-fox-logo.txt`](https://github.com/fox-toolkit/fox/blob/static/LICENSE-fox-logo.txt) for details.
911909

912910
## Acknowledgements
913911
- [hashicorp/go-immutable-radix](https://github.com/hashicorp/go-immutable-radix): Fox Tree design is inspired by Hashicorp's Immutable Radix Tree.

clientip/clientip.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import (
1212
"net/http"
1313
"strings"
1414

15-
"github.com/tigerwill90/fox"
16-
"github.com/tigerwill90/fox/internal/iterutil"
17-
"github.com/tigerwill90/fox/internal/netutil"
15+
"github.com/fox-toolkit/fox"
16+
"github.com/fox-toolkit/fox/internal/iterutil"
17+
"github.com/fox-toolkit/fox/internal/netutil"
1818
)
1919

2020
const (

clientip/clientip_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ import (
1212
"slices"
1313
"testing"
1414

15+
"github.com/fox-toolkit/fox"
1516
"github.com/stretchr/testify/assert"
1617
"github.com/stretchr/testify/require"
17-
"github.com/tigerwill90/fox"
1818
)
1919

2020
func TestRemoteAddr_ClientIP(t *testing.T) {

context.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2022 Sylvain Müller. All rights reserved.
22
// Mount of this source code is governed by a Apache-2.0 license that can be found
3-
// at https://github.com/tigerwill90/fox/blob/master/LICENSE.txt.
3+
// at https://github.com/fox-toolkit/fox/blob/master/LICENSE.txt.
44

55
package fox
66

@@ -14,8 +14,8 @@ import (
1414
"slices"
1515
"strings"
1616

17-
"github.com/tigerwill90/fox/internal/bytesconv"
18-
"github.com/tigerwill90/fox/internal/netutil"
17+
"github.com/fox-toolkit/fox/internal/bytesconv"
18+
"github.com/fox-toolkit/fox/internal/netutil"
1919
)
2020

2121
// RequestContext provides read-only access to incoming HTTP request data, including request properties,

context_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2022 Sylvain Müller. All rights reserved.
22
// Mount of this source code is governed by a Apache-2.0 license that can be found
3-
// at https://github.com/tigerwill90/fox/blob/master/LICENSE.txt.
3+
// at https://github.com/fox-toolkit/fox/blob/master/LICENSE.txt.
44

55
package fox
66

error.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2022 Sylvain Müller. All rights reserved.
22
// Mount of this source code is governed by a Apache-2.0 license that can be found
3-
// at https://github.com/tigerwill90/fox/blob/master/LICENSE.txt.
3+
// at https://github.com/fox-toolkit/fox/blob/master/LICENSE.txt.
44

55
package fox
66

fox.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2022 Sylvain Müller. All rights reserved.
22
// Mount of this source code is governed by a Apache-2.0 license that can be found
3-
// at https://github.com/tigerwill90/fox/blob/master/LICENSE.txt.
3+
// at https://github.com/fox-toolkit/fox/blob/master/LICENSE.txt.
44

55
package fox
66

@@ -18,7 +18,7 @@ import (
1818
"sync"
1919
"sync/atomic"
2020

21-
"github.com/tigerwill90/fox/internal/slicesutil"
21+
"github.com/fox-toolkit/fox/internal/slicesutil"
2222
)
2323

2424
const (
@@ -51,7 +51,7 @@ type MiddlewareFunc func(next HandlerFunc) HandlerFunc
5151
// chosen and tuned for your network configuration. This should result in a resolver never returning an error
5252
// i.e., never failing to find a candidate for the "real" IP. Consequently, getting an error result should be treated as
5353
// an application error, perhaps even worthy of panicking. Builtin best practices resolver can be found in the
54-
// github.com/tigerwill90/fox/clientip package.
54+
// github.com/fox-toolkit/fox/clientip package.
5555
type ClientIPResolver interface {
5656
// ClientIP returns the "real" client IP according to the implemented resolver. It returns an error if no valid IP
5757
// address can be derived. This is typically considered a misconfiguration error, unless the resolver involves

fox_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2022 Sylvain Müller. All rights reserved.
22
// Mount of this source code is governed by a Apache-2.0 license that can be found
3-
// at https://github.com/tigerwill90/fox/blob/master/LICENSE.txt.
3+
// at https://github.com/fox-toolkit/fox/blob/master/LICENSE.txt.
44

55
package fox
66

@@ -20,11 +20,11 @@ import (
2020
"testing"
2121
"time"
2222

23+
"github.com/fox-toolkit/fox/internal/iterutil"
24+
"github.com/fox-toolkit/fox/internal/netutil"
2325
fuzz "github.com/google/gofuzz"
2426
"github.com/stretchr/testify/assert"
2527
"github.com/stretchr/testify/require"
26-
"github.com/tigerwill90/fox/internal/iterutil"
27-
"github.com/tigerwill90/fox/internal/netutil"
2828
)
2929

3030
var (

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/tigerwill90/fox
1+
module github.com/fox-toolkit/fox
22

33
go 1.24.0
44

helpers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Copyright 2022 Sylvain Müller. All rights reserved.
22
// Mount of this source code is governed by a Apache-2.0 license that can be found
3-
// at https://github.com/tigerwill90/fox/blob/master/LICENSE.txt.
3+
// at https://github.com/fox-toolkit/fox/blob/master/LICENSE.txt.
44

55
package fox
66

0 commit comments

Comments
 (0)