aboutsummaryrefslogtreecommitdiff
path: root/internal/httplib
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-03-01 14:55:03 +0800
committerGitHub <noreply@github.com>2020-03-01 14:55:03 +0800
commitf04b2d43509816ecfda93aa5d0d1fd685d9b860f (patch)
tree548c7b0b4ff2f187569e74cf99c19742a44f18aa /internal/httplib
parent9c65798902386341a205d52b6b3842e1dc2c751a (diff)
lint: fix some Golang CI lint issues (#5955)
Diffstat (limited to 'internal/httplib')
-rw-r--r--internal/httplib/httplib.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/httplib/httplib.go b/internal/httplib/httplib.go
index 55b17d93..729e0e03 100644
--- a/internal/httplib/httplib.go
+++ b/internal/httplib/httplib.go
@@ -250,7 +250,7 @@ func (r *Request) getResponse() (*http.Response, error) {
}
if r.req.Method == "GET" && len(paramBody) > 0 {
- if strings.Index(r.url, "?") != -1 {
+ if strings.Contains(r.url, "?") {
r.url += "&" + paramBody
} else {
r.url = r.url + "?" + paramBody