소스 검색

添加url模式

yjp 2 주 전
부모
커밋
f14ace432d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      framework/core/api/router.go

+ 1 - 1
framework/core/api/router.go

@@ -236,7 +236,7 @@ func parseRelativePathPerm(basePath string, relativePathPattern string, method s
 	re := regexp.MustCompile(`\$\{(.+)\}\$`)
 	matches := re.FindStringSubmatch(relativePathPattern)
 
-	if len(matches) == 1 {
+	if len(matches) == 0 {
 		return relativePathPattern, nil, nil
 	}