Add golangci-lint workflow (#4999)

* fix lint workflow

* add golang lint

* close http response body
This commit is contained in:
andrew_li
2022-06-29 11:58:36 +08:00
committed by GitHub
parent f1e06466df
commit f289795312
141 changed files with 311 additions and 592 deletions

View File

@@ -179,6 +179,7 @@ func (p *Pipeline) ListPipelineRuns() (*devops.PipelineRunList, error) {
// listPipelineRunsByRemotePaging get the pipeline runs with pagination by remote (Jenkins BlueOcean plugin)
// get the pagination information from the server side is better than the local side, but the API has some issues
// see also https://github.com/kubesphere/kubesphere/issues/3507
//nolint:unused
func (p *Pipeline) listPipelineRunsByRemotePaging() (*devops.PipelineRunList, error) {
res, err := p.Jenkins.SendPureRequest(p.Path, p.HttpParameters)
if err != nil {
@@ -258,6 +259,7 @@ func (p *Pipeline) parsePaging() (start, limit int) {
return
}
//nolint:unused
func (p *Pipeline) searchPipelineRunsCount() (int, error) {
u, err := p.resetPaging(0, 1000)
if err != nil {