1
0
mirror of https://github.com/labstack/echo.git synced 2025-01-12 01:22:21 +02:00

Add golint to ci (#1243)

* add golint to travis ci

* fixed based on golint

* Update echo.go
This commit is contained in:
Shu Kutsuzawa 2019-01-10 08:19:48 +09:00 committed by Vishal Rana
parent 2195bd3670
commit e6ac0023d2
2 changed files with 7 additions and 1 deletions

View File

@ -4,7 +4,10 @@ go:
- tip - tip
env: env:
- GO111MODULE=on - GO111MODULE=on
install:
- go get -v golang.org/x/lint/golint
script: script:
- golint -set_exit_status ./...
- go test -race -coverprofile=coverage.txt -covermode=atomic ./... - go test -race -coverprofile=coverage.txt -covermode=atomic ./...
after_success: after_success:
- bash <(curl -s https://codecov.io/bash) - bash <(curl -s https://codecov.io/bash)

View File

@ -138,7 +138,7 @@ const (
OPTIONS = http.MethodOptions OPTIONS = http.MethodOptions
PATCH = http.MethodPatch PATCH = http.MethodPatch
POST = http.MethodPost POST = http.MethodPost
//PROPFIND = "PROPFIND" // PROPFIND = "PROPFIND"
PUT = http.MethodPut PUT = http.MethodPut
TRACE = http.MethodTrace TRACE = http.MethodTrace
) )
@ -166,6 +166,7 @@ const (
const ( const (
charsetUTF8 = "charset=UTF-8" charsetUTF8 = "charset=UTF-8"
// PROPFIND Method can be used on collection and property resources.
PROPFIND = "PROPFIND" PROPFIND = "PROPFIND"
) )
@ -219,6 +220,7 @@ const (
) )
const ( const (
// Version of Echo
Version = "3.3.dev" Version = "3.3.dev"
website = "https://echo.labstack.com" website = "https://echo.labstack.com"
// http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo // http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo
@ -705,6 +707,7 @@ func (he *HTTPError) Error() string {
return fmt.Sprintf("code=%d, message=%v", he.Code, he.Message) return fmt.Sprintf("code=%d, message=%v", he.Code, he.Message)
} }
// SetInternal sets error to HTTPError.Internal
func (he *HTTPError) SetInternal(err error) *HTTPError { func (he *HTTPError) SetInternal(err error) *HTTPError {
he.Internal = err he.Internal = err
return he return he