From e6ac0023d2f9581409747aaf34e5f620f14325bc Mon Sep 17 00:00:00 2001 From: Shu Kutsuzawa Date: Thu, 10 Jan 2019 08:19:48 +0900 Subject: [PATCH] Add golint to ci (#1243) * add golint to travis ci * fixed based on golint * Update echo.go --- .travis.yml | 3 +++ echo.go | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4674c2aa..30346d7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,10 @@ go: - tip env: - GO111MODULE=on +install: + - go get -v golang.org/x/lint/golint script: + - golint -set_exit_status ./... - go test -race -coverprofile=coverage.txt -covermode=atomic ./... after_success: - bash <(curl -s https://codecov.io/bash) diff --git a/echo.go b/echo.go index 35067a30..f0b6284b 100644 --- a/echo.go +++ b/echo.go @@ -138,7 +138,7 @@ const ( OPTIONS = http.MethodOptions PATCH = http.MethodPatch POST = http.MethodPost - //PROPFIND = "PROPFIND" + // PROPFIND = "PROPFIND" PUT = http.MethodPut TRACE = http.MethodTrace ) @@ -166,6 +166,7 @@ const ( const ( charsetUTF8 = "charset=UTF-8" + // PROPFIND Method can be used on collection and property resources. PROPFIND = "PROPFIND" ) @@ -219,6 +220,7 @@ const ( ) const ( + // Version of Echo Version = "3.3.dev" website = "https://echo.labstack.com" // 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) } +// SetInternal sets error to HTTPError.Internal func (he *HTTPError) SetInternal(err error) *HTTPError { he.Internal = err return he