Skip to content

Commit

Permalink
Merge pull request #613 from hashicorp/watsonian/fix-typo
Browse files Browse the repository at this point in the history
Fix typos in validateMemberInfo()
  • Loading branch information
watsonian authored Aug 26, 2020
2 parents fc9d3be + 52d0e38 commit 9309b94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions serf/merge_delegate.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (m *mergeDelegate) nodeToMember(n *memberlist.Node) (*Member, error) {
if n.State == memberlist.StateLeft {
status = StatusLeft
}
if err := m.validiateMemberInfo(n); err != nil {
if err := m.validateMemberInfo(n); err != nil {
return nil, err
}
return &Member{
Expand All @@ -60,7 +60,7 @@ func (m *mergeDelegate) nodeToMember(n *memberlist.Node) (*Member, error) {
}

// validateMemberInfo checks that the data we are sending is valid
func (m *mergeDelegate) validiateMemberInfo(n *memberlist.Node) error {
func (m *mergeDelegate) validateMemberInfo(n *memberlist.Node) error {
if err := m.serf.ValidateNodeNames(); err != nil {
return err
}
Expand All @@ -72,7 +72,7 @@ func (m *mergeDelegate) validiateMemberInfo(n *memberlist.Node) error {

ip := net.ParseIP(host)
if ip == nil || (ip.To4() == nil && ip.To16() == nil) {
return fmt.Errorf("%v is not a valid IPv4 or 1Pv6 address\n", ip)
return fmt.Errorf("%v is not a valid IPv4 or IPv6 address\n", ip)
}

p, err := strconv.Atoi(port)
Expand Down

0 comments on commit 9309b94

Please sign in to comment.