diff --git a/.golangci.yml b/.golangci.yml index 75f4c7f59..7cf1a6532 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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 diff --git a/server/remote/bitbucketserver/internal/client.go b/server/remote/bitbucketserver/internal/client.go index 2a2df86a9..b8977c8e7 100644 --- a/server/remote/bitbucketserver/internal/client.go +++ b/server/remote/bitbucketserver/internal/client.go @@ -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