Fix warnings
Change-Id: I2ce12d932e070b248f5b455ae0164eedc452a329
diff --git a/server/git/gerrit.go b/server/git/gerrit.go
index 6ce60e9..d795079 100644
--- a/server/git/gerrit.go
+++ b/server/git/gerrit.go
@@ -129,18 +129,6 @@
Status string `json:"status,omitempty"`
}
-type gerritReviewRequest struct {
- Message string `json:"message,omitempty"`
- Labels map[string]int `json:"labels,omitempty"`
- Reviewers []string `json:"reviewers,omitempty"`
- Comments map[string][]gerritComment `json:"comments,omitempty"`
-}
-
-type gerritComment struct {
- Line int `json:"line"`
- Message string `json:"message"`
-}
-
// CreatePullRequest creates a new change (pull request) on Gerrit
func (g *GerritPullRequestProvider) CreatePullRequest(ctx context.Context, options PullRequestOptions) (*PullRequest, error) {
reqBody := gerritCreateChangeRequest{
@@ -172,7 +160,7 @@
defer resp.Body.Close()
if resp.StatusCode != http.StatusCreated {
- return nil, fmt.Errorf("Gerrit API error: %d", resp.StatusCode)
+ return nil, fmt.Errorf("gerrit API error: %d", resp.StatusCode)
}
// Gerrit returns the change ID in the response body
@@ -205,7 +193,7 @@
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
- return nil, fmt.Errorf("Gerrit API error: %d", resp.StatusCode)
+ return nil, fmt.Errorf("gerrit API error: %d", resp.StatusCode)
}
// Read and remove Gerrit's ")]}'" prefix
@@ -268,7 +256,7 @@
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
- return nil, fmt.Errorf("Gerrit API error: %d", resp.StatusCode)
+ return nil, fmt.Errorf("gerrit API error: %d", resp.StatusCode)
}
// Read and remove Gerrit's ")]}'" prefix
@@ -321,7 +309,7 @@
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
- return nil, fmt.Errorf("Gerrit API error: %d", resp.StatusCode)
+ return nil, fmt.Errorf("gerrit API error: %d", resp.StatusCode)
}
// Fetch the updated change
@@ -355,7 +343,7 @@
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
- return fmt.Errorf("Gerrit API error: %d", resp.StatusCode)
+ return fmt.Errorf("gerrit API error: %d", resp.StatusCode)
}
return nil
@@ -378,7 +366,7 @@
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
- return fmt.Errorf("Gerrit API error: %d", resp.StatusCode)
+ return fmt.Errorf("gerrit API error: %d", resp.StatusCode)
}
return nil