Go version
go1.22.1.linux-amd64
Output of go env
in your module/workspace:
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/stan/.cache/go-build'
GOENV='/home/stan/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/stan/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/stan/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.22.1'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/stan/Documents/code/bluerpc/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build923806106=/tmp/go-build -gno-record-gcc-switches'
What did you do?
https://go.dev/play/p/R_kkd-iAPI0
What did you see happen?
If you try to create a nested http mux on a wildcard route using http.StripPrefix it will not work. In the earlier example you can see that the response is "body 404 page not found"
What did you expect to see?
I expected to see the mux handle function to go through and get "body Hello" printed
If I modify the earlier example and do a request on /{wildcard}/hello verbatim the request does go through : https://go.dev/play/p/omUCziNc8Bo
Comment From: seankhliao
Duplicate of #64909