Skip to content

all: upgrade to chi v5 #5621

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/stellar/go/exp/services/recoverysigner/internal/account"
"github.com/stellar/go/exp/services/recoverysigner/internal/db/dbtest"
"github.com/stellar/go/exp/services/recoverysigner/internal/serve/auth"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/stellar/go/exp/services/recoverysigner/internal/account"
"github.com/stellar/go/exp/services/recoverysigner/internal/db/dbtest"
"github.com/stellar/go/exp/services/recoverysigner/internal/serve/auth"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"testing"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/stellar/go/exp/services/recoverysigner/internal/account"
"github.com/stellar/go/exp/services/recoverysigner/internal/db/dbtest"
"github.com/stellar/go/exp/services/recoverysigner/internal/serve/auth"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"testing"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/stellar/go/exp/services/recoverysigner/internal/account"
"github.com/stellar/go/exp/services/recoverysigner/internal/db/dbtest"
"github.com/stellar/go/exp/services/recoverysigner/internal/serve/auth"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"testing"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/stellar/go/exp/services/recoverysigner/internal/account"
"github.com/stellar/go/exp/services/recoverysigner/internal/db/dbtest"
"github.com/stellar/go/exp/services/recoverysigner/internal/serve/auth"
Expand Down
2 changes: 1 addition & 1 deletion exp/services/recoverysigner/internal/serve/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"

firebaseauth "firebase.google.com/go/auth"
"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/prometheus/client_golang/prometheus"
"github.com/stellar/go/exp/services/recoverysigner/internal/account"
"github.com/stellar/go/exp/services/recoverysigner/internal/db"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/djherbis/fscache v0.10.1
github.com/elazarl/go-bindata-assetfs v1.0.1
github.com/getsentry/raven-go v0.2.0
github.com/go-chi/chi v4.1.2+incompatible
github.com/go-chi/chi/v5 v5.2.1
github.com/go-errors/errors v1.5.1
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/google/uuid v1.6.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ github.com/gavv/monotime v0.0.0-20161010190848-47d58efa6955 h1:gmtGRvSexPU4B1T/y
github.com/gavv/monotime v0.0.0-20161010190848-47d58efa6955/go.mod h1:vmp8DIyckQMXOPl0AQVHt+7n5h7Gb7hS6CUydiV8QeA=
github.com/getsentry/raven-go v0.2.0 h1:no+xWJRb5ZI7eE8TWgIq1jLulQiIoLG0IfYxv5JYMGs=
github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ=
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.2.1 h1:KOIHODQj58PmL80G2Eak4WdvUzjSJSm0vG72crDCqb8=
github.com/go-chi/chi/v5 v5.2.1/go.mod h1:L2yAIGWB3H+phAw1NxKwWM+7eUH/lU8pOMm5hHcoops=
github.com/go-errors/errors v1.5.1 h1:ZwEMSLRCapFLflTpT7NKaAc7ukJ8ZPEjzlxt8rPN8bk=
github.com/go-errors/errors v1.5.1/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
Expand Down
2 changes: 1 addition & 1 deletion services/federation/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/spf13/cobra"
"github.com/stellar/go/handlers/federation"
"github.com/stellar/go/support/app"
Expand Down
2 changes: 1 addition & 1 deletion services/friendbot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
stdhttp "net/http"
"os"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/spf13/cobra"

"github.com/stellar/go/services/friendbot/internal"
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/actions/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"unicode/utf8"

"github.com/asaskevich/govalidator"
"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/gorilla/schema"

"github.com/stellar/go/services/horizon/internal/assets"
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/actions/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

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

horizonContext "github.com/stellar/go/services/horizon/internal/context"
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/actions_path_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/guregu/null"

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

Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/hchi/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package hchi
import (
"context"

"github.com/go-chi/chi/middleware"
"github.com/go-chi/chi/v5/middleware"
)

// key is an unexported type for keys defined in this package.
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/hchi/context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"testing"

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

Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/httpx/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"time"

"github.com/go-chi/chi/middleware"
"github.com/go-chi/chi/v5/middleware"
"github.com/prometheus/client_golang/prometheus"

"github.com/stellar/go/services/horizon/internal/actions"
Expand Down
4 changes: 2 additions & 2 deletions services/horizon/internal/httpx/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/stellar/go/clients/stellarcore"

"github.com/go-chi/chi"
chimiddleware "github.com/go-chi/chi/middleware"
"github.com/go-chi/chi/v5"
chimiddleware "github.com/go-chi/chi/v5/middleware"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/rs/cors"
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/httpx/stream_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"sync"
"testing"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/stretchr/testify/mock"

"github.com/stellar/go/services/horizon/internal/actions"
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"
"testing"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/stellar/throttled"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
Expand Down
2 changes: 1 addition & 1 deletion services/horizon/internal/test/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/url"
"strings"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
)

type RequestHelper interface {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"testing"
"time"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/google/uuid"
"github.com/stellar/go/keypair"
"github.com/stellar/go/services/regulated-assets-approval-server/internal/db/dbtest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"testing"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/stellar/go/amount"
"github.com/stellar/go/clients/horizonclient"
"github.com/stellar/go/keypair"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"testing"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/stellar/go/clients/horizonclient"
"github.com/stellar/go/network"
"github.com/stellar/go/protocols/horizon"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"path"
"time"

"github.com/go-chi/chi"
"github.com/go-chi/chi/middleware"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/stellar/go/amount"
"github.com/stellar/go/clients/horizonclient"
"github.com/stellar/go/keypair"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http/httptest"
"testing"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/stellar/go/network"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion services/ticker/internal/graphql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strings"
"testing"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"

"github.com/stellar/go/services/ticker/internal/gql"
"github.com/stellar/go/services/ticker/internal/tickerdb/tickerdbtest"
Expand Down
2 changes: 1 addition & 1 deletion support/http/httpdecode/httpdecode.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"mime"
"net/http"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/gorilla/schema"
"github.com/stellar/go/support/errors"
)
Expand Down
2 changes: 1 addition & 1 deletion support/http/httpdecode/httpdecode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"testing"

"github.com/go-chi/chi"
"github.com/go-chi/chi/v5"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions support/http/logging_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strings"
"time"

"github.com/go-chi/chi"
"github.com/go-chi/chi/middleware"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"

"github.com/stellar/go/support/http/mutil"
"github.com/stellar/go/support/log"
Expand Down
4 changes: 2 additions & 2 deletions support/http/logging_middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
stdhttp "net/http"
"testing"

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

"github.com/stellar/go/support/http/httptest"
Expand Down
4 changes: 2 additions & 2 deletions support/http/mux.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package http

import (
"github.com/go-chi/chi"
"github.com/go-chi/chi/middleware"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/rs/cors"

"github.com/stellar/go/support/log"
Expand Down