diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2022-02-10 08:43:36 -0500 |
|---|---|---|
| committer | Dave Henderson <dhenderson@gmail.com> | 2022-02-10 10:18:13 -0500 |
| commit | 2472f437a6b3f1244508368410fdfca55e157e5d (patch) | |
| tree | 14be003603663f0247ac87dd36fcc8d217cf34f5 /docs-src | |
| parent | 9e1116b00e5657a032c491dce123d54dabbadfb4 (diff) | |
conv.URL - add example of how to redact the password
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'docs-src')
| -rw-r--r-- | docs-src/content/functions/conv.yml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs-src/content/functions/conv.yml b/docs-src/content/functions/conv.yml index 09ef6105..10aa2fc3 100644 --- a/docs-src/content/functions/conv.yml +++ b/docs-src/content/functions/conv.yml @@ -147,6 +147,8 @@ funcs: alias: urlParse description: | Parses a string as a URL for later use. Equivalent to [url.Parse](https://golang.org/pkg/net/url/#Parse) + + Any of `url.URL`'s methods can be called on the result. arguments: - name: in required: true @@ -167,6 +169,12 @@ funcs: The host is example.com:443 The path is /foo/bar ``` + - | + _Call `Redacted` to hide the password in the output:_ + ``` + $ gomplate -i '{{ (conv.URL "https://user:supersecret@example.com").Redacted }}' + https://user:xxxxx@example.com + ``` - name: conv.ParseInt description: | _**Note:**_ See [`conv.ToInt64`](#conv-toint64) instead for a simpler and more flexible variant of this function. |
