getEncodedPassword: simplify encodedPassword return
This commit is contained in:
parent
395a0c472e
commit
c34e89aec7
|
@ -148,8 +148,7 @@ func getEncodedPassword(u *url.URL) (string, bool) {
|
||||||
// filter password from all logging
|
// filter password from all logging
|
||||||
password, passwordSet := u.User.Password()
|
password, passwordSet := u.User.Password()
|
||||||
if passwordSet && password != "" {
|
if passwordSet && password != "" {
|
||||||
encodedUserPassword := strings.Split(u.User.String(), ":")
|
encodedPassword := strings.Split(u.User.String(), ":")[1]
|
||||||
encodedPassword := encodedUserPassword[len(encodedUserPassword)-1]
|
|
||||||
return encodedPassword, true
|
return encodedPassword, true
|
||||||
}
|
}
|
||||||
return password, false
|
return password, false
|
||||||
|
|
Loading…
Reference in New Issue