diff --git a/go.mod b/go.mod index a4662df377..364c41936c 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,6 @@ require ( github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1 github.com/cli/browser v1.3.0 github.com/docker/docker v28.5.2+incompatible - github.com/go-chi/chi/v5 v5.2.4 github.com/gofrs/flock v0.13.0 github.com/google/cel-go v0.27.0 github.com/google/go-cmp v0.7.0 diff --git a/go.sum b/go.sum index 5ceae1c74c..27e8312870 100644 --- a/go.sum +++ b/go.sum @@ -83,8 +83,6 @@ github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4 github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/go-chi/chi/v5 v5.2.4 h1:WtFKPHwlywe8Srng8j2BhOD9312j9cGUxG1SP4V2cR4= -github.com/go-chi/chi/v5 v5.2.4/go.mod h1:X7Gx4mteadT3eDOMTsXzmI4/rwUpOwBHLpAfupzFJP0= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= diff --git a/private/pkg/transport/http/httpserver/httpserver.go b/private/pkg/transport/http/httpserver/httpserver.go index ff6c9210eb..073f99e928 100644 --- a/private/pkg/transport/http/httpserver/httpserver.go +++ b/private/pkg/transport/http/httpserver/httpserver.go @@ -22,7 +22,6 @@ import ( "net/http" "time" - "github.com/go-chi/chi/v5" "golang.org/x/sync/errgroup" ) @@ -39,7 +38,6 @@ type runner struct { shutdownTimeout time.Duration readHeaderTimeout time.Duration tlsConfig *tls.Config - walkFunc chi.WalkFunc disableH2C bool } @@ -75,17 +73,6 @@ func RunWithTLSConfig(tlsConfig *tls.Config) RunOption { } } -// RunWithWalkFunc returns a new RunOption that runs chi.Walk to walk the -// handler after all middlewares and routes have been mounted, but before the -// server is started. -// The walkFunc will only be called if the handler passed to Run is a -// chi.Routes. -func RunWithWalkFunc(walkFunc chi.WalkFunc) RunOption { - return func(runner *runner) { - runner.walkFunc = walkFunc - } -} - // RunWithoutH2C disables use of H2C (used when RunWithTLSConfig is not called). func RunWithoutH2C() RunOption { return func(runner *runner) { @@ -125,14 +112,6 @@ func Run( Protocols: protocols, IdleTimeout: DefaultIdleTimeout, } - if s.walkFunc != nil { - routes, ok := handler.(chi.Routes) - if ok { - if err := chi.Walk(routes, s.walkFunc); err != nil { - return err - } - } - } eg, ctx := errgroup.WithContext(ctx) eg.Go(func() error {