aboutsummaryrefslogtreecommitdiff
path: root/plugin/etcd
diff options
context:
space:
mode:
authorGravatar Ondřej Benkovský <ondrej.benkovsky@jamf.com> 2022-07-10 20:06:33 +0200
committerGravatar GitHub <noreply@github.com> 2022-07-10 11:06:33 -0700
commitc2dbb7141a7c95aa521a41b27bed3af25de8f546 (patch)
tree3af5d63a0dccaa769507e34a32b6378ccef880c4 /plugin/etcd
parentabc5ac8017b0f434b5845321fb1f405ded7774d4 (diff)
downloadcoredns-c2dbb7141a7c95aa521a41b27bed3af25de8f546.tar.gz
coredns-c2dbb7141a7c95aa521a41b27bed3af25de8f546.tar.zst
coredns-c2dbb7141a7c95aa521a41b27bed3af25de8f546.zip
add golangci-lint linter (#5499)
Diffstat (limited to 'plugin/etcd')
-rw-r--r--plugin/etcd/msg/service.go1
-rw-r--r--plugin/etcd/msg/type.go2
-rw-r--r--plugin/etcd/setup.go2
3 files changed, 1 insertions, 4 deletions
diff --git a/plugin/etcd/msg/service.go b/plugin/etcd/msg/service.go
index 4e049e10a..759a86213 100644
--- a/plugin/etcd/msg/service.go
+++ b/plugin/etcd/msg/service.go
@@ -154,7 +154,6 @@ func split255(s string) []string {
} else {
sx = append(sx, s[p:])
break
-
}
p, i = p+255, i+255
}
diff --git a/plugin/etcd/msg/type.go b/plugin/etcd/msg/type.go
index ad09e74fb..a300eac76 100644
--- a/plugin/etcd/msg/type.go
+++ b/plugin/etcd/msg/type.go
@@ -15,11 +15,9 @@ import (
//
// Note that a service can double/triple as a TXT record or MX record.
func (s *Service) HostType() (what uint16, normalized net.IP) {
-
ip := net.ParseIP(s.Host)
switch {
-
case ip == nil:
if len(s.Text) == 0 {
return dns.TypeCNAME, nil
diff --git a/plugin/etcd/setup.go b/plugin/etcd/setup.go
index 751d741e1..bd81af513 100644
--- a/plugin/etcd/setup.go
+++ b/plugin/etcd/setup.go
@@ -40,7 +40,7 @@ func etcdParse(c *caddy.Controller) (*Etcd, error) {
etc.Upstream = upstream.New()
- for c.Next() {
+ if c.Next() {
etc.Zones = plugin.OriginsFromArgsOrServerBlock(c.RemainingArgs(), c.ServerBlockKeys)
for c.NextBlock() {
switch c.Val() {