We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.23.6
2.8.3
Option Yes
package cmd import ( "context" "github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/net/ghttp" "github.com/gogf/gf/v2/os/gcmd" "demo/internal/controller/hello" "fmt" ) var ( Main = gcmd.Command{ Name: "main", Usage: "main", Brief: "start http server", Func: func(ctx context.Context, parser *gcmd.Parser) (err error) { s := g.Server() s.Group("/", func(group *ghttp.RouterGroup) { group.Middleware(ghttp.MiddlewareHandlerResponse) group.Bind( hello.NewV1(), ) }) s.BindHookHandler("/demo/{num}", ghttp.HookBeforeServe, handler1()) s.BindHookHandler("/demo/:num", ghttp.HookBeforeServe, handler2()) s.Run() return nil }, } ) func handler1() func(r *ghttp.Request) { return func(r *ghttp.Request) { fmt.Println(1) } } func handler2() func(r *ghttp.Request) { return func(r *ghttp.Request) { fmt.Println(2) } }
2 1
1 2
{num} should before :num
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Go version
1.23.6
GoFrame version
2.8.3
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
What did you see happen?
2
1
What did you expect to see?
1
2
{num} should before :num
The text was updated successfully, but these errors were encountered: