From 6688a510e11ac73897294b8d17c0079faba5a139 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Thu, 20 Apr 2017 11:51:27 -0700 Subject: [PATCH] golint: Consistent receiver name Ensure the receiver name is consistent --- command/agent/command.go | 14 +++++++------- consul/server.go | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/command/agent/command.go b/command/agent/command.go index 2ff79fcfc4..f5a9480430 100644 --- a/command/agent/command.go +++ b/command/agent/command.go @@ -444,18 +444,18 @@ func (c *Command) readConfig() *Config { // verifyUniqueListeners checks to see if an address was used more than once in // the config -func (config *Config) verifyUniqueListeners() error { +func (c *Config) verifyUniqueListeners() error { listeners := []struct { host string port int descr string }{ - {config.Addresses.DNS, config.Ports.DNS, "DNS"}, - {config.Addresses.HTTP, config.Ports.HTTP, "HTTP"}, - {config.Addresses.HTTPS, config.Ports.HTTPS, "HTTPS"}, - {config.AdvertiseAddr, config.Ports.Server, "Server RPC"}, - {config.AdvertiseAddr, config.Ports.SerfLan, "Serf LAN"}, - {config.AdvertiseAddr, config.Ports.SerfWan, "Serf WAN"}, + {c.Addresses.DNS, c.Ports.DNS, "DNS"}, + {c.Addresses.HTTP, c.Ports.HTTP, "HTTP"}, + {c.Addresses.HTTPS, c.Ports.HTTPS, "HTTPS"}, + {c.AdvertiseAddr, c.Ports.Server, "Server RPC"}, + {c.AdvertiseAddr, c.Ports.SerfLan, "Serf LAN"}, + {c.AdvertiseAddr, c.Ports.SerfWan, "Serf WAN"}, } type key struct { diff --git a/consul/server.go b/consul/server.go index ab209d8630..dec733899e 100644 --- a/consul/server.go +++ b/consul/server.go @@ -803,8 +803,8 @@ func (s *Server) JoinWAN(addrs []string) (int, error) { } // LocalMember is used to return the local node -func (c *Server) LocalMember() serf.Member { - return c.serfLAN.LocalMember() +func (s *Server) LocalMember() serf.Member { + return s.serfLAN.LocalMember() } // LANMembers is used to return the members of the LAN cluster