Skip to content

Commit

Permalink
Merge pull request #124 from danielgtaylor/chi-v5
Browse files Browse the repository at this point in the history
feat: upgrade to Chi v5
  • Loading branch information
danielgtaylor authored Sep 8, 2023
2 parents cd77a2d + a8a65fc commit 2872304
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion adapters/humachi/humachi.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/danielgtaylor/huma/v2"
"github.com/danielgtaylor/huma/v2/queryparam"
"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
)

type chiContext struct {
Expand Down
2 changes: 1 addition & 1 deletion adapters/humachi/humachi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
humav1 "github.com/danielgtaylor/huma"
"github.com/danielgtaylor/huma/responses"
"github.com/danielgtaylor/huma/v2"
"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
)

var lastModified = time.Now()
Expand Down
2 changes: 1 addition & 1 deletion api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package huma
import (
"testing"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/danielgtaylor/huma/v2/adapters/humachi"
"github.com/danielgtaylor/huma/v2/autopatch"
"github.com/danielgtaylor/huma/v2/sse"
"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/goccy/go-yaml"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/greet/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/danielgtaylor/huma/v2"
"github.com/danielgtaylor/huma/v2/adapters/humachi"
"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
)

// Options for the CLI.
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/evanphx/json-patch/v5 v5.6.0
github.com/fxamacker/cbor/v2 v2.4.0
github.com/gin-gonic/gin v1.9.1
github.com/go-chi/chi v4.1.2+incompatible
github.com/go-chi/chi/v5 v5.0.10
github.com/goccy/go-yaml v1.11.0
github.com/gofiber/fiber/v2 v2.45.0
github.com/google/uuid v1.3.0
Expand Down Expand Up @@ -37,6 +37,7 @@ require (
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-chi/chi v4.1.2+incompatible // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg=
github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU=
github.com/go-chi/chi v4.1.2+incompatible h1:fGFk2Gmi/YKXk0OmGfBh0WgmN3XB8lVnEyNz34tQRec=
github.com/go-chi/chi v4.1.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ=
github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk=
github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
Expand Down
2 changes: 1 addition & 1 deletion huma_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"time"

"github.com/danielgtaylor/huma/v2/queryparam"
"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/goccy/go-yaml"
"github.com/mitchellh/mapstructure"
"github.com/stretchr/testify/assert"
Expand Down
2 changes: 1 addition & 1 deletion humatest/humatest.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (

"github.com/danielgtaylor/huma/v2"
"github.com/danielgtaylor/huma/v2/queryparam"
"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
)

// TB is a subset of the `testing.TB` interface used by the test API and
Expand Down
2 changes: 1 addition & 1 deletion humatest/humatest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"

"github.com/danielgtaylor/huma/v2"
"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/stretchr/testify/assert"
)

Expand Down

0 comments on commit 2872304

Please sign in to comment.