Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Commit

Permalink
Fix some idomatic golangci warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
chmouel committed Nov 30, 2018
1 parent f704ac4 commit d0952bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions application/rest/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ func AbsoluteURLAsURL(req *http.Request, relative string) (*url.URL, error) {
// ReadBody reads body from a ReadCloser and returns it as a string
func ReadBody(body io.ReadCloser) string {
buf := new(bytes.Buffer)
buf.ReadFrom(body)
_, _ = buf.ReadFrom(body)
return buf.String()
}

// CloseResponse reads the body and close the response. To be used to prevent file descriptor leaks.
func CloseResponse(response *http.Response) {
ioutil.ReadAll(response.Body)
_, _ = ioutil.ReadAll(response.Body)
response.Body.Close()
}
2 changes: 1 addition & 1 deletion controller/pipeline_environments_blackbox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestPipelineEnvironmentController(t *testing.T) {

func (s *PipelineEnvironmentControllerSuite) SetupSuite() {
s.DBTestSuite.SetupSuite()
config, err := configuration.New("")
config, _ := configuration.New("")

s.db = gormapp.NewGormDB(s.DB)

Expand Down

0 comments on commit d0952bd

Please sign in to comment.