Linter fixes (#246)

Linter fixes
This commit is contained in:
Adrian Gallagher
2019-02-05 16:26:04 +11:00
committed by GitHub
parent d7368c1a8d
commit 5e5ca8a887
85 changed files with 641 additions and 794 deletions

View File

@@ -21,7 +21,7 @@ Block style example:
func SendHTTPRequest(method, path string, headers map[string]string, body io.Reader) (string, error) {
result := strings.ToUpper(method)
if result != "POST" && result != "GET" && result != "DELETE" {
if result != http.MethodPost && result != http.MethodGet && result != http.MethodDelete {
return "", errors.New("Invalid HTTP method specified.")
}

View File

@@ -21,7 +21,7 @@ Block style example:
func SendHTTPRequest(method, path string, headers map[string]string, body io.Reader) (string, error) {
result := strings.ToUpper(method)
if result != "POST" && result != "GET" && result != "DELETE" {
if result != http.MethodPost && result != http.MethodGet && result != http.MethodDelete {
return "", errors.New("Invalid HTTP method specified.")
}