mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-23 00:46:30 +00:00
Add linter unused (#551)
This commit is contained in:
parent
c4700e9693
commit
2c75a299e2
2 changed files with 2 additions and 13 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue