aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec
diff options
context:
space:
mode:
authornrxr <nrxrco@gmail.com>2020-04-08 10:21:40 +0000
committerEmmanuel Odeke <emm.odeke@gmail.com>2020-04-08 21:04:32 +0000
commite3323f57df1f4a44093a2d25fee33513325cbb86 (patch)
treeb601c0a6bcedb345a941da4eab42379dd687b4d1 /src/os/exec
parentb2790a2838fc4c15c3663e35efeb0ca5331840f3 (diff)
downloadgo-e3323f57df1f4a44093a2d25fee33513325cbb86.tar.xz
net/url: add URL.Redacted to return a password scrubbed string
Returning an URL.String() without the password is very useful for situations where the URL is supposed to be logged and the password is not useful to be shown. This method re-uses URL.String() but with the password scrubbed and substituted for a "xxxxx" in order to make it obvious that there was a password. If the URL had no password then no "xxxxx" will be shown. Fixes #34855 Change-Id: I7f17d81aa09a7963d2731d16fe15c6ae8e2285fc GitHub-Last-Rev: 46d06dbc4f9e30a57667bb8d0627bc1abed83bdc GitHub-Pull-Request: golang/go#35578 Reviewed-on: https://go-review.googlesource.com/c/go/+/207082 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Emmanuel Odeke <emm.odeke@gmail.com>
Diffstat (limited to 'src/os/exec')
0 files changed, 0 insertions, 0 deletions