(path string)
| 144 | } |
| 145 | |
| 146 | func IsFrontendPath(path string) bool { |
| 147 | reqUri := strings.TrimSuffix(path, "/") |
| 148 | if _, ok := constant.WebUrlMap[reqUri]; ok { |
| 149 | return true |
| 150 | } |
| 151 | for _, route := range constant.DynamicRoutes { |
| 152 | if match, _ := regexp.MatchString(route, reqUri); match { |
| 153 | return true |
| 154 | } |
| 155 | } |
| 156 | return false |
| 157 | } |
| 158 | |
| 159 | func CanServeFrontendPath(c *gin.Context) bool { |
| 160 | if !IsFrontendPath(c.Request.URL.Path) { |
no outgoing calls
no test coverage detected