mirror of
https://github.com/lima-vm/lima.git
synced 2026-10-28 11:44:35 +08:00
textutil,dns: enable and fix dupword lint issues
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
This commit is contained in:
1 parent
b1047b092e
commit
975dc17afb
3 files changed
+4
-3
No files matched your search
@@ -35,6 +35,7 @@ linters:
|
||||
- bodyclose
|
||||
# - dogsled
|
||||
# - dupl
|
||||
- dupword
|
||||
# - errcheck
|
||||
# - errorlint
|
||||
# - exhaustive
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in new issue
Block a user