Skip to content

Commit

Permalink
if username or password are specified, don't assume anonymous in exam…
Browse files Browse the repository at this point in the history
…ple.go
  • Loading branch information
James Andariese committed Apr 13, 2015
1 parent e8c25dc commit a1c1069
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _example/example.go
Expand Up @@ -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()
}
}

Expand Down

0 comments on commit a1c1069

Please sign in to comment.