Skip to content

Commit

Permalink
fix: fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fust committed Nov 4, 2024
1 parent 295a3a9 commit 61d5f4c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
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: 1 addition & 2 deletions internal/infoblox/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func ToHostResponseMap(res []ibclient.HostRecord) *ResponseMap {

func ToPTRResponseMap(res []ibclient.RecordPTR) *ResponseMap {
rm := &ResponseMap{
Map: make(map[string]ResponseDetails),
Map: make(map[string]ResponseDetails),
RecordType: ibclient.PtrRecord,
}
for _, record := range res {
Expand Down Expand Up @@ -134,4 +134,3 @@ func (rm *ResponseMap) ToEndpoints() []*endpoint.Endpoint {
}
return endpoints
}

2 changes: 1 addition & 1 deletion pkg/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (p *Webhook) headerCheck(isContentType bool, w http.ResponseWriter, r *http
} else {
msg += "an accept header"
}
err := fmt.Errorf(msg)
err := fmt.Errorf("%s", msg)

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

0 comments on commit 61d5f4c

Please sign in to comment.