优化URL匹配方法

This commit is contained in:
刘祥超
2023-03-07 17:21:38 +08:00
parent 866697ddd0
commit f4a690a5c3
2 changed files with 7 additions and 1 deletions

View File

@@ -43,6 +43,12 @@ func TestURLPattern_Match(t *testing.T) {
url: "https://example.com",
result: true,
},
{
patternType: "wildcard",
pattern: "*COM",
url: "https://example.com/hello",
result: false,
},
{
patternType: "wildcard",
pattern: "http://*",