textutil,dns: enable and fix dupword lint issues

Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
This commit is contained in:
Oleksandr Redko committed 2023-11-01 23:06:22 +02:00
1 parent b1047b092e
commit 975dc17afb
3 files changed
+4 -3

No files matched your search

+1
View File
@@ -35,6 +35,7 @@ linters:
- bodyclose
# - dogsled
# - dupl
- dupword
# - errcheck
# - errorlint
# - exhaustive
+1 -1
View File
@@ -68,7 +68,7 @@ func (s *Server) Shutdown() {
}
func newStaticClientConfig(ips []string) (*dns.ClientConfig, error) {
logrus.Tracef("newStaticClientConfig creating config for the the following IPs: %v", ips)
logrus.Tracef("newStaticClientConfig creating config for the following IPs: %v", ips)
s := ``
for _, ip := range ips {
s += fmt.Sprintf("nameserver %s\n", ip)
+2 -2
View File
@@ -77,7 +77,7 @@ var TemplateFuncMap = template.FuncMap{
},
"indent": func(a ...interface{}) (string, error) {
if len(a) == 0 {
return "", errors.New("function takes at at least one string argument")
return "", errors.New("function takes at least one string argument")
}
if len(a) > 2 {
return "", errors.New("function takes at most 2 arguments")
@@ -97,7 +97,7 @@ var TemplateFuncMap = template.FuncMap{
},
"missing": func(a ...interface{}) (string, error) {
if len(a) == 0 {
return "", errors.New("function takes at at least one string argument")
return "", errors.New("function takes at least one string argument")
}
if len(a) > 2 {
return "", errors.New("function takes at most 2 arguments")