Skip to content

Commit

Permalink
Bump golang-ci in pipelines (#24)
Browse files Browse the repository at this point in the history
* Bump golang-ci in pipelines

Signed-off-by: Dinar Valeev <[email protected]>

* fix linting issues

---------

Signed-off-by: Dinar Valeev <[email protected]>
Co-authored-by: Michal Kuritka <[email protected]>
  • Loading branch information
k0da and kuritka authored Nov 5, 2024
1 parent 3fddeb4 commit 821c450
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ jobs:
- name: GolangCI
uses: golangci/golangci-lint-action@v3
with:
version: v1.55.2
version: v1.61.0
args: --timeout=3m
4 changes: 2 additions & 2 deletions cmd/webhook/init/dnsprovider/dnsprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ func Init(config configuration.Config) (provider.Provider, error) {
regexp.MustCompile(config.RegexDomainExclusion),
)
} else {
if config.DomainFilter != nil && len(config.DomainFilter) > 0 {
if len(config.DomainFilter) > 0 {
createMsg += fmt.Sprintf("domain filter: '%s', ", strings.Join(config.DomainFilter, ","))
}
if config.ExcludeDomains != nil && len(config.ExcludeDomains) > 0 {
if len(config.ExcludeDomains) > 0 {
createMsg += fmt.Sprintf("exclude domain filter: '%s', ", strings.Join(config.ExcludeDomains, ","))
}
domainFilter = endpoint.NewDomainFilterWithExclusions(config.DomainFilter, config.ExcludeDomains)
Expand Down
3 changes: 2 additions & 1 deletion pkg/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic

import (
"encoding/json"
"errors"
"fmt"
"net/http"

Expand Down Expand Up @@ -89,7 +90,7 @@ func (p *Webhook) headerCheck(isContentType bool, w http.ResponseWriter, r *http
} else {
msg += "an accept header"
}
err := fmt.Errorf(msg)
err := errors.New(msg)

_, writeErr := fmt.Fprint(w, err.Error())
if writeErr != nil {
Expand Down

0 comments on commit 821c450

Please sign in to comment.