mirror of
https://github.com/hashicorp/packer.git
synced 2026-06-11 01:30:06 -04:00
getEncodedPassword: simplify encodedPassword return
This commit is contained in:
parent
395a0c472e
commit
c34e89aec7
1 changed files with 1 additions and 2 deletions
|
|
@ -148,8 +148,7 @@ func getEncodedPassword(u *url.URL) (string, bool) {
|
|||
// filter password from all logging
|
||||
password, passwordSet := u.User.Password()
|
||||
if passwordSet && password != "" {
|
||||
encodedUserPassword := strings.Split(u.User.String(), ":")
|
||||
encodedPassword := encodedUserPassword[len(encodedUserPassword)-1]
|
||||
encodedPassword := strings.Split(u.User.String(), ":")[1]
|
||||
return encodedPassword, true
|
||||
}
|
||||
return password, false
|
||||
|
|
|
|||
Loading…
Reference in a new issue