Skip to content

Commit 975dc17

Browse files
committed
textutil,dns: enable and fix dupword lint issues
Signed-off-by: Oleksandr Redko <[email protected]>
1 parent b1047b0 commit 975dc17

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ linters:
3535
- bodyclose
3636
# - dogsled
3737
# - dupl
38+
- dupword
3839
# - errcheck
3940
# - errorlint
4041
# - exhaustive

pkg/hostagent/dns/dns.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (s *Server) Shutdown() {
6868
}
6969

7070
func newStaticClientConfig(ips []string) (*dns.ClientConfig, error) {
71-
logrus.Tracef("newStaticClientConfig creating config for the the following IPs: %v", ips)
71+
logrus.Tracef("newStaticClientConfig creating config for the following IPs: %v", ips)
7272
s := ``
7373
for _, ip := range ips {
7474
s += fmt.Sprintf("nameserver %s\n", ip)

pkg/textutil/textutil.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ var TemplateFuncMap = template.FuncMap{
7777
},
7878
"indent": func(a ...interface{}) (string, error) {
7979
if len(a) == 0 {
80-
return "", errors.New("function takes at at least one string argument")
80+
return "", errors.New("function takes at least one string argument")
8181
}
8282
if len(a) > 2 {
8383
return "", errors.New("function takes at most 2 arguments")
@@ -97,7 +97,7 @@ var TemplateFuncMap = template.FuncMap{
9797
},
9898
"missing": func(a ...interface{}) (string, error) {
9999
if len(a) == 0 {
100-
return "", errors.New("function takes at at least one string argument")
100+
return "", errors.New("function takes at least one string argument")
101101
}
102102
if len(a) > 2 {
103103
return "", errors.New("function takes at most 2 arguments")

0 commit comments

Comments
 (0)