Skip to content

Commit

Permalink
net/url: update Redacted documentation
Browse files Browse the repository at this point in the history
According to Brad Fitzpatrick's suggestion
  • Loading branch information
nrxr committed Nov 15, 2019
1 parent 4a3b9c2 commit 7ec1240
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/net/url/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,8 @@ func (u *URL) String() string {
return buf.String()
}

// Redacted returns a password-redacted version of the String() method, only if
// the password exists. The password is substituted by "xxxxx".
// Redacted is like String but redacts any password with "xxxxx".
// Only the password in u.URL is redacted.
func (u *URL) Redacted() string {
rdkt := *u
if _, has := rdkt.User.Password(); has {
Expand Down

0 comments on commit 7ec1240

Please sign in to comment.