Commit 4383e438 authored by Antonio Murdaca's avatar Antonio Murdaca Committed by Brad Fitzpatrick

net/url: avoid if statement

Change-Id: I894a8f49d29dbb6f9265e4b3df5767318b225460
Signed-off-by: default avatarAntonio Murdaca <runcom@redhat.com>
Reviewed-on: https://go-review.googlesource.com/24492Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 5df7f522
......@@ -356,10 +356,7 @@ func (u *Userinfo) Username() string {
// Password returns the password in case it is set, and whether it is set.
func (u *Userinfo) Password() (string, bool) {
if u.passwordSet {
return u.password, true
}
return "", false
return u.password, u.passwordSet
}
// String returns the encoded userinfo information in the standard form
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment