mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-24 08:02:18 +02:00
Add linter unused (#551)
This commit is contained in:
parent
c4700e9693
commit
2c75a299e2
@ -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 New Issue
Block a user