forked from jshiffer/go-xmpp
if username or password are specified, don't assume anonymous in example.go
This commit is contained in:
parent
e8c25dcffe
commit
a1c1069091
@ -32,8 +32,10 @@ func main() {
|
||||
}
|
||||
flag.Parse()
|
||||
if *username == "" || *password == "" {
|
||||
if *debug {
|
||||
if *debug && *username == "" && *password == "" {
|
||||
fmt.Fprintf(os.Stderr, "no username or password were given; attempting ANONYMOUS auth\n")
|
||||
} else if *username != "" || *password != "" {
|
||||
flag.Usage()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user