follow up from comment from mattn

s/found_anonymous/foundAnonymous/g
This commit is contained in:
James Andariese 2015-04-12 22:28:30 -07:00
parent a1c1069091
commit 6c1f4b23f8

View File

@ -297,15 +297,15 @@ func (c *Client) init(o *Options) error {
} }
if o.User == "" && o.Password == "" { if o.User == "" && o.Password == "" {
found_anonymous := false foundAnonymous := false
for _, m := range f.Mechanisms.Mechanism { for _, m := range f.Mechanisms.Mechanism {
if m == "ANONYMOUS" { if m == "ANONYMOUS" {
fmt.Fprintf(c.conn, "<auth xmlns='%s' mechanism='ANONYMOUS' />\n", nsSASL) fmt.Fprintf(c.conn, "<auth xmlns='%s' mechanism='ANONYMOUS' />\n", nsSASL)
found_anonymous = true foundAnonymous = true
break break
} }
} }
if !found_anonymous { if !foundAnonymous {
return fmt.Errorf("ANONYMOUS authentication is not an option and username and password were not specified") return fmt.Errorf("ANONYMOUS authentication is not an option and username and password were not specified")
} }
} else { } else {