Skip to content

Commit 821c450

Browse files
k0dakuritka
andauthored
Bump golang-ci in pipelines (#24)
* 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]>
1 parent 3fddeb4 commit 821c450

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/golangci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ jobs:
3333
- name: GolangCI
3434
uses: golangci/golangci-lint-action@v3
3535
with:
36-
version: v1.55.2
36+
version: v1.61.0
3737
args: --timeout=3m

cmd/webhook/init/dnsprovider/dnsprovider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ func Init(config configuration.Config) (provider.Provider, error) {
4747
regexp.MustCompile(config.RegexDomainExclusion),
4848
)
4949
} else {
50-
if config.DomainFilter != nil && len(config.DomainFilter) > 0 {
50+
if len(config.DomainFilter) > 0 {
5151
createMsg += fmt.Sprintf("domain filter: '%s', ", strings.Join(config.DomainFilter, ","))
5252
}
53-
if config.ExcludeDomains != nil && len(config.ExcludeDomains) > 0 {
53+
if len(config.ExcludeDomains) > 0 {
5454
createMsg += fmt.Sprintf("exclude domain filter: '%s', ", strings.Join(config.ExcludeDomains, ","))
5555
}
5656
domainFilter = endpoint.NewDomainFilterWithExclusions(config.DomainFilter, config.ExcludeDomains)

pkg/webhook/webhook.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Generated by GoLic, for more details see: https://github.com/AbsaOSS/golic
2020

2121
import (
2222
"encoding/json"
23+
"errors"
2324
"fmt"
2425
"net/http"
2526

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

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

0 commit comments

Comments
 (0)