Commit 94643c14 authored by pityonline's avatar pityonline Committed by Sander van Harmelen

Some small fixes (#401)

* fix golint exit status

* add comments to fix golint complaining

* make go vet verbose

* fix wrong usage of printing
parent cd73cda9
...@@ -15,8 +15,8 @@ jobs: ...@@ -15,8 +15,8 @@ jobs:
- stage: lint - stage: lint
script: script:
- go get github.com/golang/lint/golint - go get github.com/golang/lint/golint
- golint - golint -set_exit_status
- go vet - go vet -v
- stage: test - stage: test
script: script:
- go test -v - go test -v
......
...@@ -61,6 +61,10 @@ func (m MergeRequestApprovals) String() string { ...@@ -61,6 +61,10 @@ func (m MergeRequestApprovals) String() string {
return Stringify(m) return Stringify(m)
} }
// ApproveMergeRequestOptions represents the available ApproveMergeRequest() options.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/merge_request_approvals.html#approve-merge-request
type ApproveMergeRequestOptions struct { type ApproveMergeRequestOptions struct {
Sha *string `url:"sha,omitempty" json:"sha,omitempty"` Sha *string `url:"sha,omitempty" json:"sha,omitempty"`
} }
......
...@@ -53,7 +53,7 @@ func TestValidate(t *testing.T) { ...@@ -53,7 +53,7 @@ func TestValidate(t *testing.T) {
mux.HandleFunc("/ci/lint", func(w http.ResponseWriter, r *http.Request) { mux.HandleFunc("/ci/lint", func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, "POST") testMethod(t, r, "POST")
fmt.Fprintf(w, tc.response) fmt.Fprint(w, tc.response)
}) })
got, _, err := client.Validate.Lint(tc.content) got, _, err := client.Validate.Lint(tc.content)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment