fixed golint/go vet

Change-Id: Id8aa01511f459d45f9dc3270e1d13b8682944016
This commit is contained in:
sm
2016-05-23 23:54:35 -07:00
parent f69efc8f36
commit 435e28966a
5 changed files with 28 additions and 11 deletions
+2
View File
@@ -5,6 +5,7 @@ import (
"net/http"
)
// HTTP implements error and keeps track of http return codes.
type HTTP struct {
error
Message string
@@ -15,6 +16,7 @@ func (e HTTP) Error() string {
return fmt.Sprintf("%d: %s", e.Code, e.Message)
}
// ToHTTP wraps the type assertion to change an error into an HTTP.
func ToHTTP(err error) *HTTP {
if err == nil {
return nil