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
func TestAPIMatchAll(t *testing.T) { domain1 := "baidu.com" params := make(map[string][]byte, 0) paramsFunc := func(name, value []byte) { params[string(name)] = value } var id uint64 r := NewRoute() r.Add(&metapb.API{ ID: 1, MatchRule: metapb.MatchAll, URLPattern: "/a/b/c", Method: "POST", Domain: domain1, }) id, ret := r.Find([]byte("/a/b/d/c"), "POST", paramsFunc) if !ret { t.Fatal(ret) return } if id != 1 { t.Errorf("expect matched 1, but %d", id) } }
我理解的这个go test应该会失败,但是这个test pass了,所以这是一个bug,还是一个feature?
The text was updated successfully, but these errors were encountered:
296f649
No branches or pull requests
我理解的这个go test应该会失败,但是这个test pass了,所以这是一个bug,还是一个feature?
The text was updated successfully, but these errors were encountered: