Add linter unused (#551)

This commit is contained in:
Lukas 2021-11-27 15:29:37 +01:00 committed by GitHub
parent c4700e9693
commit 2c75a299e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 13 deletions

View file

@ -21,6 +21,7 @@ linters:
- structcheck
- varcheck
- ineffassign
- unused
run:
timeout: 5m
@ -30,3 +31,4 @@ issues:
- path: woodpecker-go/woodpecker/client.go|server/swagger/swagger.go
linters:
- deadcode
- unused

View file

@ -296,19 +296,6 @@ func (c *Client) doPost(url string, status *BuildStatus) error {
return err
}
//Helper function to do delete on the hook
func (c *Client) doDelete(url string) error {
request, err := http.NewRequestWithContext(c.ctx, "DELETE", url, nil)
if err != nil {
return err
}
response, err := c.client.Do(request)
if response != nil {
defer response.Body.Close()
}
return err
}
//Helper function to get repos paginated
func (c *Client) paginatedRepos(start int) ([]*Repo, error) {
limit := 1000