Skip to content

Commit 1cbc3a2

Browse files
author
Peter Kieltyka
committed
Fix lint warnings
1 parent c584fb8 commit 1cbc3a2

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.travis.yml

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ go:
44
- 1.7.x
55
- 1.8.x
66
- 1.9.x
7-
- tip
87

98
install:
109
- go get -u golang.org/x/tools/cmd/goimports

middleware/get_head.go

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"github.com/go-chi/chi"
77
)
88

9+
// GetHead automatically route undefined HEAD requests to GET handlers.
910
func GetHead(next http.Handler) http.Handler {
1011
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
1112
if r.Method == "HEAD" {

tree.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const (
2929
mTRACE
3030
)
3131

32-
var mALL methodTyp = mCONNECT | mDELETE | mGET | mHEAD |
32+
var mALL = mCONNECT | mDELETE | mGET | mHEAD |
3333
mOPTIONS | mPATCH | mPOST | mPUT | mTRACE
3434

3535
var methodMap = map[string]methodTyp{
@@ -44,6 +44,8 @@ var methodMap = map[string]methodTyp{
4444
"TRACE": mTRACE,
4545
}
4646

47+
// RegisterMethod adds support for custom HTTP method handlers, available
48+
// via Router#Method and Router#MethodFunc
4749
func RegisterMethod(method string) {
4850
if method == "" {
4951
return

0 commit comments

Comments
 (0)