mirror of https://github.com/status-im/consul.git
golint: Consistent receiver name
Ensure the receiver name is consistent
This commit is contained in:
parent
5f34d766b8
commit
6688a510e1
|
@ -444,18 +444,18 @@ func (c *Command) readConfig() *Config {
|
||||||
|
|
||||||
// verifyUniqueListeners checks to see if an address was used more than once in
|
// verifyUniqueListeners checks to see if an address was used more than once in
|
||||||
// the config
|
// the config
|
||||||
func (config *Config) verifyUniqueListeners() error {
|
func (c *Config) verifyUniqueListeners() error {
|
||||||
listeners := []struct {
|
listeners := []struct {
|
||||||
host string
|
host string
|
||||||
port int
|
port int
|
||||||
descr string
|
descr string
|
||||||
}{
|
}{
|
||||||
{config.Addresses.DNS, config.Ports.DNS, "DNS"},
|
{c.Addresses.DNS, c.Ports.DNS, "DNS"},
|
||||||
{config.Addresses.HTTP, config.Ports.HTTP, "HTTP"},
|
{c.Addresses.HTTP, c.Ports.HTTP, "HTTP"},
|
||||||
{config.Addresses.HTTPS, config.Ports.HTTPS, "HTTPS"},
|
{c.Addresses.HTTPS, c.Ports.HTTPS, "HTTPS"},
|
||||||
{config.AdvertiseAddr, config.Ports.Server, "Server RPC"},
|
{c.AdvertiseAddr, c.Ports.Server, "Server RPC"},
|
||||||
{config.AdvertiseAddr, config.Ports.SerfLan, "Serf LAN"},
|
{c.AdvertiseAddr, c.Ports.SerfLan, "Serf LAN"},
|
||||||
{config.AdvertiseAddr, config.Ports.SerfWan, "Serf WAN"},
|
{c.AdvertiseAddr, c.Ports.SerfWan, "Serf WAN"},
|
||||||
}
|
}
|
||||||
|
|
||||||
type key struct {
|
type key struct {
|
||||||
|
|
|
@ -803,8 +803,8 @@ func (s *Server) JoinWAN(addrs []string) (int, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// LocalMember is used to return the local node
|
// LocalMember is used to return the local node
|
||||||
func (c *Server) LocalMember() serf.Member {
|
func (s *Server) LocalMember() serf.Member {
|
||||||
return c.serfLAN.LocalMember()
|
return s.serfLAN.LocalMember()
|
||||||
}
|
}
|
||||||
|
|
||||||
// LANMembers is used to return the members of the LAN cluster
|
// LANMembers is used to return the members of the LAN cluster
|
||||||
|
|
Loading…
Reference in New Issue