gin-gonic / gin
Showing 1 of 1 files from the diff.

@@ -11,6 +11,11 @@
Loading
11 11
	"strings"
12 12
)
13 13
14 +
var (
15 +
	// reg match english letters for http method name
16 +
	regEnLetter = regexp.MustCompile("^[A-Z]+$")
17 +
)
18 +
14 19
// IRouter defines all router handle interface includes single and group router.
15 20
type IRouter interface {
16 21
	IRoutes
@@ -87,7 +92,7 @@
Loading
87 92
// frequently used, non-standardized or custom methods (e.g. for internal
88 93
// communication with a proxy).
89 94
func (group *RouterGroup) Handle(httpMethod, relativePath string, handlers ...HandlerFunc) IRoutes {
90 -
	if matches, err := regexp.MatchString("^[A-Z]+$", httpMethod); !matches || err != nil {
95 +
	if matched := regEnLetter.MatchString(httpMethod); !matched {
91 96
		panic("http method " + httpMethod + " is not valid")
92 97
	}
93 98
	return group.handle(httpMethod, relativePath, handlers)
Files Coverage
binding 100.00%
render 92.96%
auth.go 100.00%
context.go 97.63%
debug.go 100.00%
deprecated.go 100.00%
errors.go 100.00%
fs.go 100.00%
gin.go 99.13%
logger.go 100.00%
mode.go 100.00%
path.go 100.00%
recovery.go 97.18%
response_writer.go 93.33%
routergroup.go 100.00%
test_helpers.go 100.00%
tree.go 100.00%
utils.go 96.83%
Project Totals (41 files) 98.67%
5085.1
1.13.x=.13.x
TRAVIS_OS_NAME=linux
5085.2
1.13.x=.13.x
TRAVIS_OS_NAME=linux
5085.5
TRAVIS_OS_NAME=linux
1.15.x=.15.x
5085.3
1.14.x=.14.x
TRAVIS_OS_NAME=linux
5085.6
TRAVIS_OS_NAME=linux
1.15.x=.15.x
5085.4
1.14.x=.14.x
TRAVIS_OS_NAME=linux
5085.8
1.16.x=.16.x
TRAVIS_OS_NAME=linux
5085.7
1.16.x=.16.x
TRAVIS_OS_NAME=linux
5085.9
TRAVIS_OS_NAME=linux
master=
1
coverage:
2
  notify:
3
    gitter:
4
      default:
5
        url: https://webhooks.gitter.im/e/d90dcdeeab2f1e357165
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading