diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2024-06-28 22:08:01 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-29 02:08:01 +0000 |
| commit | bdf4f8c7d802c6f8ce4bbe6418d583a1449fe493 (patch) | |
| tree | 0098cad0706a2bf2e090c21f302fb5d79ce7fbd9 /docs-src/content | |
| parent | c9643cad84f95ac0086f8caa0b868364741aa6e6 (diff) | |
docs(fix): Fix broken links, add CI to check (#2156)
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'docs-src/content')
| -rw-r--r-- | docs-src/content/functions/aws.yml | 20 | ||||
| -rw-r--r-- | docs-src/content/functions/base64.yml | 4 | ||||
| -rw-r--r-- | docs-src/content/functions/coll.yml | 20 | ||||
| -rw-r--r-- | docs-src/content/functions/conv.yml | 44 | ||||
| -rw-r--r-- | docs-src/content/functions/crypto.yml | 16 | ||||
| -rw-r--r-- | docs-src/content/functions/data.yml | 26 | ||||
| -rw-r--r-- | docs-src/content/functions/env.yml | 6 | ||||
| -rw-r--r-- | docs-src/content/functions/file.yml | 8 | ||||
| -rw-r--r-- | docs-src/content/functions/filepath.yml | 26 | ||||
| -rw-r--r-- | docs-src/content/functions/math.yml | 10 | ||||
| -rw-r--r-- | docs-src/content/functions/net.yml | 14 | ||||
| -rw-r--r-- | docs-src/content/functions/path.yml | 18 | ||||
| -rw-r--r-- | docs-src/content/functions/random.yml | 2 | ||||
| -rw-r--r-- | docs-src/content/functions/regexp.yml | 16 | ||||
| -rw-r--r-- | docs-src/content/functions/sockaddr.yml | 2 | ||||
| -rw-r--r-- | docs-src/content/functions/strings.yml | 58 | ||||
| -rw-r--r-- | docs-src/content/functions/test.yml | 6 | ||||
| -rw-r--r-- | docs-src/content/functions/time.yml | 44 | ||||
| -rw-r--r-- | docs-src/content/functions/tmpl.yml | 2 | ||||
| -rw-r--r-- | docs-src/content/functions/uuid.yml | 2 |
20 files changed, 172 insertions, 172 deletions
diff --git a/docs-src/content/functions/aws.yml b/docs-src/content/functions/aws.yml index 722cf5d4..4809b0bb 100644 --- a/docs-src/content/functions/aws.yml +++ b/docs-src/content/functions/aws.yml @@ -23,7 +23,7 @@ funcs: alias: ec2meta released: v1.8.0 description: | - Queries AWS [EC2 Instance Metadata](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) for information. This only retrieves data in the `meta-data` path -- for data in the `dynamic` path use `aws.EC2Dynamic`. + Queries AWS [EC2 Instance Metadata](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) for information. This only retrieves data in the `meta-data` path -- for data in the `dynamic` path use `aws.EC2Dynamic`. For times when running outside EC2, or when the metadata API can't be reached, a `default` value can be provided. pipeline: false @@ -42,7 +42,7 @@ funcs: alias: ec2dynamic released: v1.8.0 description: | - Queries AWS [EC2 Instance Dynamic Metadata](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) for information. This only retrieves data in the `dynamic` path -- for data in the `meta-data` path use `aws.EC2Meta`. + Queries AWS [EC2 Instance Dynamic Metadata](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) for information. This only retrieves data in the `dynamic` path -- for data in the `meta-data` path use `aws.EC2Meta`. For times when running outside EC2, or when the metadata API can't be reached, a `default` value can be provided. pipeline: false @@ -86,7 +86,7 @@ funcs: alias: ec2tag released: v3.8.0 description: | - Queries the AWS EC2 API to find the value of the given [user-defined tag](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html). An optional default + Queries the AWS EC2 API to find the value of the given [user-defined tag](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html). An optional default can be provided. pipeline: false arguments: @@ -107,7 +107,7 @@ funcs: alias: ec2tags released: v3.8.0 description: | - Queries the AWS EC2 API to find all the tags/values [user-defined tag](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html). + Queries the AWS EC2 API to find all the tags/values [user-defined tag](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html). pipeline: false arguments: examples: @@ -138,7 +138,7 @@ funcs: See [the AWS documentation](https://docs.aws.amazon.com/kms/latest/developerguide/overview.html) for more details. - See also [`aws.KMSDecrypt`](#aws-kmsdecrypt). + See also [`aws.KMSDecrypt`](#awskmsdecrypt). pipeline: true arguments: - name: keyID @@ -162,7 +162,7 @@ funcs: See [the AWS documentation](https://docs.aws.amazon.com/kms/latest/developerguide/overview.html) for more details. - See also [`aws.KMSEncrypt`](#aws-kmsencrypt). + See also [`aws.KMSEncrypt`](#awskmsencrypt). pipeline: true arguments: - name: input @@ -179,7 +179,7 @@ funcs: Wraps the [STS GetCallerIdentity API](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity.html) - See also [`aws.UserID`](#aws-userid) and [`aws.ARN`](#aws-arn). + See also [`aws.UserID`](#awsuserid) and [`aws.ARN`](#awsarn). pipeline: false examples: - | @@ -192,7 +192,7 @@ funcs: Wraps the [STS GetCallerIdentity API](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity.html) - See also [`aws.UserID`](#aws-userid) and [`aws.Account`](#aws-account). + See also [`aws.UserID`](#awsuserid) and [`aws.Account`](#awsaccount). pipeline: false examples: - | @@ -203,12 +203,12 @@ funcs: description: | Returns the unique identifier of the calling entity. The exact value depends on the type of entity making the call. The values returned are those - listed in the `aws:userid` column in the [Principal table](http://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable) + listed in the `aws:userid` column in the [Principal table](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable) found on the Policy Variables reference page in the IAM User Guide. Wraps the [STS GetCallerIdentity API](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity.html) - See also [`aws.ARN`](#aws-arn) and [`aws.Account`](#aws-account). + See also [`aws.ARN`](#awsarn) and [`aws.Account`](#awsaccount). pipeline: false examples: - | diff --git a/docs-src/content/functions/base64.yml b/docs-src/content/functions/base64.yml index 6d1c23ed..d74863ff 100644 --- a/docs-src/content/functions/base64.yml +++ b/docs-src/content/functions/base64.yml @@ -23,7 +23,7 @@ funcs: Decode a Base64 string. This supports both standard ([RFC4648 §4](https://tools.ietf.org/html/rfc4648#section-4)) and URL-safe ([RFC4648 §5](https://tools.ietf.org/html/rfc4648#section-5)) encodings. This function outputs the data as a string, so it may not be appropriate - for decoding binary data. Use [`base64.DecodeBytes`](#base64.DecodeBytes) + for decoding binary data. Use [`base64.DecodeBytes`](#base64decodebytes) for binary data. pipeline: true arguments: @@ -44,7 +44,7 @@ funcs: This function outputs the data as a byte array, so it's most useful for outputting binary data that will be processed further. - Use [`base64.Decode`](#base64.Decode) to output a plain string. + Use [`base64.Decode`](#base64decode) to output a plain string. pipeline: false arguments: - name: input diff --git a/docs-src/content/functions/coll.yml b/docs-src/content/functions/coll.yml index 16d1dab1..b27f1e2a 100644 --- a/docs-src/content/functions/coll.yml +++ b/docs-src/content/functions/coll.yml @@ -19,11 +19,11 @@ funcs: All keys are converted to strings. This function is equivalent to [Sprig's `dict`](http://masterminds.github.io/sprig/dicts.html#dict) - function, as used in [Helm templates](https://docs.helm.sh/chart_template_guide#template-functions-and-pipelines). + function, as used in [Helm templates](https://helm.sh/docs/chart_template_guide/functions_and_pipelines/). - For creating more complex maps, see [`data.JSON`](../data/#data-json) or [`data.YAML`](../data/#data-yaml). + For creating more complex maps, see [`data.JSON`](../data/#datajson) or [`data.YAML`](../data/#datayaml). - For creating arrays, see [`coll.Slice`](#coll-slice). + For creating arrays, see [`coll.Slice`](#collslice-_deprecated_). arguments: - name: in... required: true @@ -63,7 +63,7 @@ funcs: - name: coll.GoSlice released: v4.0.0 description: | - This exposes the `slice` function from Go's [`text/template`](https://golang.org/pkg/text/template/#hdr-Functions) + This exposes the `slice` function from Go's [`text/template`](https://pkg.go.dev/text/template/#hdr-Functions) package. Note that using `slice` will use the `coll.Slice` function instead, which may not be desired. For some background on this, see [this issue](https://github.com/hairyhenderson/gomplate/issues/1461). @@ -209,7 +209,7 @@ funcs: The keys will be ordered first by map position (if multiple maps are given), then alphabetically. - See also [`coll.Values`](#coll-values). + See also [`coll.Values`](#collvalues). pipeline: true arguments: - name: in... @@ -230,7 +230,7 @@ funcs: The values will be ordered first by map position (if multiple maps are given), then alphabetically by key. - See also [`coll.Keys`](#coll-keys). + See also [`coll.Keys`](#collkeys). pipeline: true arguments: - name: in... @@ -250,7 +250,7 @@ funcs: _Note that this function does not change the given list; it always produces a new one._ - See also [`coll.Prepend`](#coll-prepend). + See also [`coll.Prepend`](#collprepend). pipeline: true arguments: - name: value @@ -271,7 +271,7 @@ funcs: _Note that this function does not change the given list; it always produces a new one._ - See also [`coll.Append`](#coll-append). + See also [`coll.Append`](#collappend). pipeline: true arguments: - name: value @@ -412,7 +412,7 @@ funcs: The keys can either be separate arguments, or a slice (since v4.0.0). - This is the inverse of [`coll.Omit`](#coll-omit). + This is the inverse of [`coll.Omit`](#collomit). _Note that this function does not modify the input._ pipeline: true @@ -440,7 +440,7 @@ funcs: The keys can either be separate arguments, or a slice (since v4.0.0). - This is the inverse of [`coll.Pick`](#coll-pick). + This is the inverse of [`coll.Pick`](#collpick). _Note that this function does not modify the input._ pipeline: true diff --git a/docs-src/content/functions/conv.yml b/docs-src/content/functions/conv.yml index 237af8e5..31fca92f 100644 --- a/docs-src/content/functions/conv.yml +++ b/docs-src/content/functions/conv.yml @@ -8,7 +8,7 @@ funcs: alias: bool released: v0.2.0 description: | - **Note:** See also [`conv.ToBool`](#conv-tobool) for a more flexible variant. + **Note:** See also [`conv.ToBool`](#convtobool) for a more flexible variant. Converts a true-ish string to a boolean. Can be used to simplify conditional statements based on environment variables or other text input. pipeline: true @@ -38,7 +38,7 @@ funcs: Note that this will not provide a default for the case where the input is undefined (i.e. referencing things like `.foo` where there is no `foo` field of `.`), but - [`conv.Has`](#conv-has) can be used for that. + [`coll.Has`](../coll/#collhas) can be used for that. pipeline: true arguments: - name: default @@ -52,7 +52,7 @@ funcs: $ gomplate -i '{{ "" | default "foo" }} {{ "bar" | default "baz" }}' foo bar - name: conv.Dict - deprecated: Renamed to [`coll.Dict`](#coll-dict) + deprecated: Renamed to [`coll.Dict`](../coll/#colldict) alias: dict released: v3.0.0 description: | @@ -64,11 +64,11 @@ funcs: All keys are converted to strings. This function is equivalent to [Sprig's `dict`](http://masterminds.github.io/sprig/dicts.html#dict) - function, as used in [Helm templates](https://docs.helm.sh/chart_template_guide#template-functions-and-pipelines). + function, as used in [Helm templates](https://helm.sh/docs/chart_template_guide/functions_and_pipelines/). - For creating more complex maps, see [`data.JSON`](../data/#data-json) or [`data.YAML`](../data/#data-yaml). + For creating more complex maps, see [`data.JSON`](../data/#datajson) or [`data.YAML`](../data/#datayaml). - For creating arrays, see [`coll.Slice`](#coll-slice). + For creating arrays, see [`coll.Slice`](../coll/#collslice-_deprecated_). arguments: - name: in... required: true @@ -89,7 +89,7 @@ funcs: Hello world! Hello everybody! - name: conv.Slice - deprecated: Renamed to [`coll.Slice`](#coll-slice) + deprecated: Renamed to [`coll.Slice`](../coll/#collslice-_deprecated_) alias: slice released: v0.3.0 description: | @@ -106,7 +106,7 @@ funcs: Hello, Lisa Hello, Maggie - name: conv.Has - deprecated: Renamed to [`coll.Has`](#coll-has) + deprecated: Renamed to [`coll.Has`](../coll/#collhas) alias: has released: v1.5.0 description: | @@ -153,7 +153,7 @@ funcs: alias: urlParse released: v2.0.0 description: | - Parses a string as a URL for later use. Equivalent to [url.Parse](https://golang.org/pkg/net/url/#Parse) + Parses a string as a URL for later use. Equivalent to [url.Parse](https://pkg.go.dev/net/url/#Parse) Any of `url.URL`'s methods can be called on the result. arguments: @@ -185,9 +185,9 @@ funcs: - name: conv.ParseInt released: v1.4.0 description: | - _**Note:**_ See [`conv.ToInt64`](#conv-toint64) instead for a simpler and more flexible variant of this function. + _**Note:**_ See [`conv.ToInt64`](#convtoint64) instead for a simpler and more flexible variant of this function. - Parses a string as an int64. Equivalent to [strconv.ParseInt](https://golang.org/pkg/strconv/#ParseInt) + Parses a string as an int64. Equivalent to [strconv.ParseInt](https://pkg.go.dev/strconv/#ParseInt) rawExamples: - | _`input.tmpl`:_ @@ -204,9 +204,9 @@ funcs: - name: conv.ParseFloat released: v1.4.0 description: | - _**Note:**_ See [`conv.ToFloat`](#conv-tofloat) instead for a simpler and more flexible variant of this function. + _**Note:**_ See [`conv.ToFloat64`](#convtofloat64) instead for a simpler and more flexible variant of this function. - Parses a string as an float64 for later use. Equivalent to [strconv.ParseFloat](https://golang.org/pkg/strconv/#ParseFloat) + Parses a string as an float64 for later use. Equivalent to [strconv.ParseFloat](https://pkg.go.dev/strconv/#ParseFloat) rawExamples: - | _`input.tmpl`:_ @@ -224,7 +224,7 @@ funcs: - name: conv.ParseUint released: v1.4.0 description: | - Parses a string as an uint64 for later use. Equivalent to [strconv.ParseUint](https://golang.org/pkg/strconv/#ParseUint) + Parses a string as an uint64 for later use. Equivalent to [strconv.ParseUint](https://pkg.go.dev/strconv/#ParseUint) rawExamples: - | _`input.tmpl`:_ @@ -241,9 +241,9 @@ funcs: - name: conv.Atoi released: v1.4.0 description: | - _**Note:**_ See [`conv.ToInt`](#conv-toint) and [`conv.ToInt64`](#conv-toint64) instead for simpler and more flexible variants of this function. + _**Note:**_ See [`conv.ToInt`](#convtoint) and [`conv.ToInt64`](#convtoint64) instead for simpler and more flexible variants of this function. - Parses a string as an int for later use. Equivalent to [strconv.Atoi](https://golang.org/pkg/strconv/#Atoi) + Parses a string as an int for later use. Equivalent to [strconv.Atoi](https://pkg.go.dev/strconv/#Atoi) rawExamples: - | _`input.tmpl`:_ @@ -324,7 +324,7 @@ funcs: released: v2.2.0 description: | Converts the input to an `int` (signed integer, 32- or 64-bit depending - on platform). This is similar to [`conv.ToInt64`](#conv-toint64) on 64-bit + on platform). This is similar to [`conv.ToInt64`](#convtoint64) on 64-bit platforms, but is useful when input to another function must be provided as an `int`. @@ -335,7 +335,7 @@ funcs: [CWE-190](https://cwe.mitre.org/data/definitions/190.html) and [CWE-681](https://cwe.mitre.org/data/definitions/681.html). - See also [`conv.ToInt64`](#conv-toint64). + See also [`conv.ToInt64`](#convtoint64). arguments: - name: in required: true @@ -357,7 +357,7 @@ funcs: Unconvertable inputs will result in errors. - This delegates to [`conv.ToInt64`](#conv-toint64) for each input argument. + This delegates to [`conv.ToInt64`](#convtoint64) for each input argument. arguments: - name: in... required: true @@ -373,7 +373,7 @@ funcs: Unconvertable inputs will result in errors. - This delegates to [`conv.ToInt`](#conv-toint) for each input argument. + This delegates to [`conv.ToInt`](#convtoint) for each input argument. arguments: - name: in... required: true @@ -409,7 +409,7 @@ funcs: Unconvertable inputs will result in errors. - This delegates to [`conv.ToFloat64`](#conv-tofloat64) for each input argument. + This delegates to [`conv.ToFloat64`](#convtofloat64) for each input argument. arguments: - name: in... required: true @@ -441,7 +441,7 @@ funcs: description: | Converts the inputs (of any type) to an array of `string`s - This delegates to [`conv.ToString`](#conv-tostring) for each input argument. + This delegates to [`conv.ToString`](#convtostring) for each input argument. arguments: - name: in... required: true diff --git a/docs-src/content/functions/crypto.yml b/docs-src/content/functions/crypto.yml index adbcb1b0..ee7f4c5d 100644 --- a/docs-src/content/functions/crypto.yml +++ b/docs-src/content/functions/crypto.yml @@ -37,7 +37,7 @@ funcs: This function prints the output as a string. Note that this may result in unreadable text if the decrypted payload is binary. See - [`crypto.DecryptAESBytes`](#crypto.DecryptAESBytes) for another method. + [`crypto.DecryptAESBytes`](#cryptodecryptaesbytes-_experimental_) for another method. This function is suitable for decrypting data that was encrypted by Helm's `encryptAES` function, when the input is base64-decoded, and when @@ -242,14 +242,14 @@ funcs: description: | Decrypt an RSA-encrypted input and print the output as a string. Note that this may result in unreadable text if the decrypted payload is binary. See - [`crypto.RSADecryptBytes`](#crypto.RSADecryptBytes) for a safer method. + [`crypto.RSADecryptBytes`](#cryptorsadecryptbytes-_experimental_) for a safer method. The private key must be a PEM-encoded RSA private key in PKCS#1, ASN.1 DER form, which typically begins with `-----BEGIN RSA PRIVATE KEY-----`. The input text must be plain ciphertext, as a byte array, or safely convertible to a byte array. To decrypt base64-encoded input, you must - first decode with the [`base64.DecodeBytes`](../base64/#base64.DecodeBytes) + first decode with the [`base64.DecodeBytes`](../base64/#base64decodebytes) function. pipeline: true arguments: @@ -281,10 +281,10 @@ funcs: The input text must be plain ciphertext, as a byte array, or safely convertible to a byte array. To decrypt base64-encoded input, you must - first decode with the [`base64.DecodeBytes`](../base64/#base64.DecodeBytes) + first decode with the [`base64.DecodeBytes`](../base64/#base64decodebytes) function. - See [`crypto.RSADecrypt`](#crypto.RSADecrypt) for a function that outputs + See [`crypto.RSADecrypt`](#cryptorsadecrypt-_experimental_) for a function that outputs a string. pipeline: true arguments: @@ -319,13 +319,13 @@ funcs: ASN.1 DER form are also supported (beginning with `RSA PUBLIC KEY`). The output will not be encoded, so consider - [base64-encoding](../base64/#base64.Encode) it for display. + [base64-encoding](../base64/#base64encode) it for display. _Note:_ Output encrypted with this function will _not_ be deterministic, so encrypting the same input twice will not result in the same ciphertext. _Warning:_ Using this function may not be safe. See the warning on Go's - [`rsa.EncryptPKCS1v15`](https://golang.org/pkg/crypto/rsa/#EncryptPKCS1v15) + [`rsa.EncryptPKCS1v15`](https://pkg.go.dev/crypto/rsa/#EncryptPKCS1v15) documentation. pipeline: true arguments: @@ -461,7 +461,7 @@ funcs: - name: crypto.WPAPSK released: v2.3.0 description: | - This is really an alias to [`crypto.PBKDF2`](#crypto.PBKDF2) with the + This is really an alias to [`crypto.PBKDF2`](#cryptopbkdf2) with the values necessary to convert ASCII passphrases to the WPA pre-shared keys for use with WiFi networks. This can be used, for example, to help generate a configuration for [wpa_supplicant](http://w1.fi/wpa_supplicant/). diff --git a/docs-src/content/functions/data.yml b/docs-src/content/functions/data.yml index 6753cafe..eaa3b0ce 100644 --- a/docs-src/content/functions/data.yml +++ b/docs-src/content/functions/data.yml @@ -6,7 +6,7 @@ funcs: alias: ds released: v0.5.0 description: | - Parses a given datasource (provided by the [`--datasource/-d`](../../usage/#datasource-d) argument or [`defineDatasource`](#definedatasource)). + Parses a given datasource (provided by the [`--datasource/-d`](../../usage/#--datasource-d) argument or [`defineDatasource`](#definedatasource)). If the `alias` is undefined, but is a valid URL, `datasource` will dynamically read from that URL. @@ -34,7 +34,7 @@ funcs: released: v1.3.0 description: | Tests whether or not a given datasource was defined on the commandline (with the - [`--datasource/-d`](../../usage/#datasource-d) argument). This is intended mainly to allow + [`--datasource/-d`](../../usage/#--datasource-d) argument). This is intended mainly to allow a template to be rendered differently whether or not a given datasource was defined. @@ -78,7 +78,7 @@ funcs: - name: defineDatasource released: v2.7.0 description: | - Define a datasource alias with target URL inside the template. Overridden by the [`--datasource/-d`](../../usage/#datasource-d) flag. + Define a datasource alias with target URL inside the template. Overridden by the [`--datasource/-d`](../../usage/#--datasource-d) flag. Note: once a datasource is defined, it can not be redefined (i.e. if this function is called twice with the same alias, only the first applies). @@ -109,14 +109,14 @@ funcs: - name: include released: v1.8.0 description: | - Includes the content of a given datasource (provided by the [`--datasource/-d`](../../usage/#datasource-d) argument). + Includes the content of a given datasource (provided by the [`--datasource/-d`](../../usage/#--datasource-d) argument). This is similar to [`datasource`](#datasource), except that the data is not parsed. There is no restriction on the type of data included, except that it should be textual. pipeline: false arguments: - name: alias required: true - description: the datasource alias, as provided by [`--datasource/-d`](../../usage/#datasource-d) + description: the datasource alias, as provided by [`--datasource/-d`](../../usage/#--datasource-d) - name: subpath required: false description: the subpath to use, if supported by the datasource @@ -151,7 +151,7 @@ funcs: Converts a JSON string into an object. Works for JSON Objects, but will also parse JSON Arrays. Will not parse other valid JSON types. - For more explict JSON Array support, see [`data.JSONArray`](#data-jsonarray). + For more explict JSON Array support, see [`data.JSONArray`](#datajsonarray). #### Encrypted JSON support (EJSON) @@ -206,7 +206,7 @@ funcs: Converts a YAML string into an object. Works for YAML Objects but will also parse YAML Arrays. This can be used to access properties of YAML objects. - For more explict YAML Array support, see [`data.JSONArray`](#data-yamlarray). + For more explict YAML Array support, see [`data.JSONArray`](#datayamlarray). pipeline: true arguments: - name: in @@ -352,7 +352,7 @@ funcs: alias: csvByColumn released: v2.0.0 description: | - Like [`csvByRow`](#csvByRow), except that the data is presented as a columnar + Like [`csvByRow`](#datacsvbyrow), except that the data is presented as a columnar (column-oriented) map. pipeline: true arguments: @@ -434,7 +434,7 @@ funcs: Converts an object to a pretty-printed (or _indented_) JSON document. Input objects may be the result of functions like `data.JSON`, `data.YAML`, `data.JSONArray`, or `data.YAMLArray` functions, or they could be provided - by a [`datasource`](../general/datasource). + by a [`datasource`](../datasources). The indent string must be provided as an argument. pipeline: true @@ -464,7 +464,7 @@ funcs: description: | Converts an object to a YAML document. Input objects may be the result of `data.JSON`, `data.YAML`, `data.JSONArray`, or `data.YAMLArray` functions, - or they could be provided by a [`datasource`](../general/datasource). + or they could be provided by a [`datasource`](../datasources). pipeline: true arguments: - name: obj @@ -502,14 +502,14 @@ funcs: released: v2.0.0 description: | Converts an object to a CSV document. The input object must be a 2-dimensional - array of strings (a `[][]string`). Objects produced by [`data.CSVByRow`](#conv-csvbyrow) - and [`data.CSVByColumn`](#conv-csvbycolumn) cannot yet be converted back to CSV documents. + array of strings (a `[][]string`). Objects produced by [`data.CSVByRow`](#datacsvbyrow) + and [`data.CSVByColumn`](#datacsvbycolumn) cannot yet be converted back to CSV documents. **Note:** With the exception that a custom delimiter can be used, `data.ToCSV` outputs according to the [RFC 4180](https://tools.ietf.org/html/rfc4180) format, which means that line terminators are `CRLF` (Windows format, or `\r\n`). If you require `LF` (UNIX format, or `\n`), the output can be piped through - [`strings.ReplaceAll`](../strings/#strings-replaceall) to replace `"\r\n"` with `"\n"`. + [`strings.ReplaceAll`](../strings/#stringsreplaceall) to replace `"\r\n"` with `"\n"`. pipeline: true arguments: - name: delim diff --git a/docs-src/content/functions/env.yml b/docs-src/content/functions/env.yml index 1222ac7e..8ff0c7ac 100644 --- a/docs-src/content/functions/env.yml +++ b/docs-src/content/functions/env.yml @@ -7,7 +7,7 @@ funcs: alias: getenv released: v0.2.0 description: | - Exposes the [os.Getenv](https://golang.org/pkg/os/#Getenv) function. + Exposes the [os.Getenv](https://pkg.go.dev/os/#Getenv) function. Retrieves the value of the environment variable named by the key. If the variable is unset, but the same variable ending in `_FILE` is set, the contents @@ -42,12 +42,12 @@ funcs: - name: env.ExpandEnv released: v2.5.0 description: | - Exposes the [os.ExpandEnv](https://golang.org/pkg/os/#ExpandEnv) function. + Exposes the [os.ExpandEnv](https://pkg.go.dev/os/#ExpandEnv) function. Replaces `${var}` or `$var` in the input string according to the values of the current environment variables. References to undefined variables are replaced by the empty string. - Like [`env.Getenv`](#env-getenv), the `_FILE` variant of a variable is used. + Like [`env.Getenv`](#envgetenv), the `_FILE` variant of a variable is used. pipeline: false arguments: - name: input diff --git a/docs-src/content/functions/file.yml b/docs-src/content/functions/file.yml index 3e8f5ed4..855480e0 100644 --- a/docs-src/content/functions/file.yml +++ b/docs-src/content/functions/file.yml @@ -87,9 +87,9 @@ funcs: - name: file.Stat released: v2.4.0 description: | - Returns a [`os.FileInfo`](https://golang.org/pkg/os/#FileInfo) describing the named path. + Returns a [`os.FileInfo`](https://pkg.go.dev/os/#FileInfo) describing the named path. - Essentially a wrapper for Go's [`os.Stat`](https://golang.org/pkg/os/#Stat) function. + Essentially a wrapper for Go's [`os.Stat`](https://pkg.go.dev/os/#Stat) function. pipeline: true arguments: - name: path @@ -103,13 +103,13 @@ funcs: - name: file.Walk released: v2.6.0 description: | - Like a recursive [`file.ReadDir`](#file-readdir), recursively walks the file tree rooted at `path`, and returns an array of all files and directories contained within. + Like a recursive [`file.ReadDir`](#filereaddir), recursively walks the file tree rooted at `path`, and returns an array of all files and directories contained within. The files are walked in lexical order, which makes the output deterministic but means that for very large directories can be inefficient. Walk does not follow symbolic links. - Similar to Go's [`filepath.Walk`](https://golang.org/pkg/path/filepath/#Walk) function. + Similar to Go's [`filepath.Walk`](https://pkg.go.dev/path/filepath/#Walk) function. pipeline: true arguments: - name: path diff --git a/docs-src/content/functions/filepath.yml b/docs-src/content/functions/filepath.yml index 239c02a4..69b65c0c 100644 --- a/docs-src/content/functions/filepath.yml +++ b/docs-src/content/functions/filepath.yml @@ -6,14 +6,14 @@ preamble: | This page documents the `filepath` namespace - see also the [`path`](../path) documentation. - These functions are wrappers for Go's [`path/filepath`](https://golang.org/pkg/path/filepath/) package. + These functions are wrappers for Go's [`path/filepath`](https://pkg.go.dev/path/filepath/) package. funcs: - name: filepath.Base released: v2.7.0 description: | Returns the last element of path. Trailing path separators are removed before extracting the last element. If the path is empty, Base returns `.`. If the path consists entirely of separators, Base returns a single separator. - A wrapper for Go's [`filepath.Base`](https://golang.org/pkg/path/filepath/#Base) function. + A wrapper for Go's [`filepath.Base`](https://pkg.go.dev/path/filepath/#Base) function. pipeline: true arguments: - name: path @@ -28,7 +28,7 @@ funcs: description: | Clean returns the shortest path name equivalent to path by purely lexical processing. - A wrapper for Go's [`filepath.Clean`](https://golang.org/pkg/path/filepath/#Clean) function. + A wrapper for Go's [`filepath.Clean`](https://pkg.go.dev/path/filepath/#Clean) function. pipeline: true arguments: - name: path @@ -43,7 +43,7 @@ funcs: description: | Returns all but the last element of path, typically the path's directory. - A wrapper for Go's [`filepath.Dir`](https://golang.org/pkg/path/filepath/#Dir) function. + A wrapper for Go's [`filepath.Dir`](https://pkg.go.dev/path/filepath/#Dir) function. pipeline: true arguments: - name: path @@ -58,7 +58,7 @@ funcs: description: | Returns the file name extension used by path. - A wrapper for Go's [`filepath.Ext`](https://golang.org/pkg/path/filepath/#Ext) function. + A wrapper for Go's [`filepath.Ext`](https://pkg.go.dev/path/filepath/#Ext) function. pipeline: true arguments: - name: path @@ -73,7 +73,7 @@ funcs: description: | Returns the result of replacing each slash (`/`) character in the path with the platform's separator character. - A wrapper for Go's [`filepath.FromSlash`](https://golang.org/pkg/path/filepath/#FromSlash) function. + A wrapper for Go's [`filepath.FromSlash`](https://pkg.go.dev/path/filepath/#FromSlash) function. pipeline: true arguments: - name: path @@ -90,7 +90,7 @@ funcs: description: | Reports whether the path is absolute. - A wrapper for Go's [`filepath.IsAbs`](https://golang.org/pkg/path/filepath/#IsAbs) function. + A wrapper for Go's [`filepath.IsAbs`](https://pkg.go.dev/path/filepath/#IsAbs) function. pipeline: true arguments: - name: path @@ -107,7 +107,7 @@ funcs: description: | Joins any number of path elements into a single path, adding a separator if necessary. - A wrapper for Go's [`filepath.Join`](https://golang.org/pkg/path/filepath/#Join) function. + A wrapper for Go's [`filepath.Join`](https://pkg.go.dev/path/filepath/#Join) function. arguments: - name: elem... required: true @@ -123,7 +123,7 @@ funcs: description: | Reports whether name matches the shell file name pattern. - A wrapper for Go's [`filepath.Match`](https://golang.org/pkg/path/filepath/#Match) function. + A wrapper for Go's [`filepath.Match`](https://pkg.go.dev/path/filepath/#Match) function. arguments: - name: pattern required: true @@ -140,7 +140,7 @@ funcs: description: | Returns a relative path that is lexically equivalent to targetpath when joined to basepath with an intervening separator. - A wrapper for Go's [`filepath.Rel`](https://golang.org/pkg/path/filepath/#Rel) function. + A wrapper for Go's [`filepath.Rel`](https://pkg.go.dev/path/filepath/#Rel) function. arguments: - name: basepath required: true @@ -159,7 +159,7 @@ funcs: The function returns an array with two values, the first being the diretory, and the second the file. - A wrapper for Go's [`filepath.Split`](https://golang.org/pkg/path/filepath/#Split) function. + A wrapper for Go's [`filepath.Split`](https://pkg.go.dev/path/filepath/#Split) function. pipeline: true arguments: - name: path @@ -176,7 +176,7 @@ funcs: description: | Returns the result of replacing each separator character in path with a slash (`/`) character. - A wrapper for Go's [`filepath.ToSlash`](https://golang.org/pkg/path/filepath/#ToSlash) function. + A wrapper for Go's [`filepath.ToSlash`](https://pkg.go.dev/path/filepath/#ToSlash) function. pipeline: true arguments: - name: path @@ -193,7 +193,7 @@ funcs: description: | Returns the leading volume name. Given `C:\foo\bar` it returns `C:` on Windows. Given a UNC like `\\host\share\foo` it returns `\\host\share`. On other platforms it returns an empty string. - A wrapper for Go's [`filepath.VolumeName`](https://golang.org/pkg/path/filepath/#VolumeName) function. + A wrapper for Go's [`filepath.VolumeName`](https://pkg.go.dev/path/filepath/#VolumeName) function. pipeline: true arguments: - name: path diff --git a/docs-src/content/functions/math.yml b/docs-src/content/functions/math.yml index d375ae02..53f14103 100644 --- a/docs-src/content/functions/math.yml +++ b/docs-src/content/functions/math.yml @@ -52,7 +52,7 @@ funcs: - name: math.Ceil released: v2.6.0 description: | - Returns the least integer value greater than or equal to a given floating-point number. This wraps Go's [`math.Ceil`](https://golang.org/pkg/math/#Ceil). + Returns the least integer value greater than or equal to a given floating-point number. This wraps Go's [`math.Ceil`](https://pkg.go.dev/math/#Ceil). **Note:** the return value of this function is a `float64` so that the special-cases `NaN` and `Inf` can be returned appropriately. arguments: @@ -89,7 +89,7 @@ funcs: - name: math.Floor released: v2.6.0 description: | - Returns the greatest integer value less than or equal to a given floating-point number. This wraps Go's [`math.Floor`](https://golang.org/pkg/math/#Floor). + Returns the greatest integer value less than or equal to a given floating-point number. This wraps Go's [`math.Floor`](https://pkg.go.dev/math/#Floor). **Note:** the return value of this function is a `float64` so that the special-cases `NaN` and `Inf` can be returned appropriately. arguments: @@ -154,7 +154,7 @@ funcs: - name: math.Max released: v2.6.0 description: | - Returns the largest number provided. If any values are floating-point numbers, a `float64` is returned, otherwise an `int64` is returned. The same special-cases as Go's [`math.Max`](https://golang.org/pkg/math/#Max) are followed. + Returns the largest number provided. If any values are floating-point numbers, a `float64` is returned, otherwise an `int64` is returned. The same special-cases as Go's [`math.Max`](https://pkg.go.dev/math/#Max) are followed. arguments: - name: nums... required: true @@ -166,7 +166,7 @@ funcs: - name: math.Min released: v2.6.0 description: | - Returns the smallest number provided. If any values are floating-point numbers, a `float64` is returned, otherwise an `int64` is returned. The same special-cases as Go's [`math.Min`](https://golang.org/pkg/math/#Min) are followed. + Returns the smallest number provided. If any values are floating-point numbers, a `float64` is returned, otherwise an `int64` is returned. The same special-cases as Go's [`math.Min`](https://pkg.go.dev/math/#Min) are followed. arguments: - name: nums... required: true @@ -192,7 +192,7 @@ funcs: alias: pow released: v2.2.0 description: | - Calculate an exponent - _b<sup>n</sup>_. This wraps Go's [`math.Pow`](https://golang.org/pkg/math/#Pow). If any values are floating-point numbers, a `float64` is returned, otherwise an `int64` is returned. + Calculate an exponent - _b<sup>n</sup>_. This wraps Go's [`math.Pow`](https://pkg.go.dev/math/#Pow). If any values are floating-point numbers, a `float64` is returned, otherwise an `int64` is returned. arguments: - name: b required: true diff --git a/docs-src/content/functions/net.yml b/docs-src/content/functions/net.yml index 4afa5689..1150cd48 100644 --- a/docs-src/content/functions/net.yml +++ b/docs-src/content/functions/net.yml @@ -58,11 +58,11 @@ funcs: Resolve a DNS [`SRV` service record](https://en.wikipedia.org/wiki/SRV_record). This implementation supports the canonical [RFC2782](https://tools.ietf.org/html/rfc2782) form (i.e. `_Service._Proto.Name`), but other forms are also supported, such as - those served by [Consul's DNS interface](https://www.consul.io/docs/agent/dns.html#standard-lookup). + those served by [Consul's DNS interface](https://developer.hashicorp.com/consul/docs/services/discovery/dns-dynamic-lookups#standard-lookup). When multiple records are returned, this function returns the first. - A [`net.SRV`](https://golang.org/pkg/net/#SRV) data structure is returned. The + A [`net.SRV`](https://pkg.go.dev/net/#SRV) data structure is returned. The following properties are available: - `Target` - _(string)_ the hostname where the service can be reached - `Port` - _(uint16)_ the service's port @@ -87,11 +87,11 @@ funcs: Resolve a DNS [`SRV` service record](https://en.wikipedia.org/wiki/SRV_record). This implementation supports the canonical [RFC2782](https://tools.ietf.org/html/rfc2782) form (i.e. `_Service._Proto.Name`), but other forms are also supported, such as - those served by [Consul's DNS interface](https://www.consul.io/docs/agent/dns.html#standard-lookup). + those served by [Consul's DNS interface](https://developer.hashicorp.com/consul/docs/services/discovery/dns-dynamic-lookups#standard-lookup). This function returns all available SRV records. - An array of [`net.SRV`](https://golang.org/pkg/net/#SRV) data structures is + An array of [`net.SRV`](https://pkg.go.dev/net/#SRV) data structures is returned. For each element, the following properties are available: - `Target` - _(string)_ the hostname where the service can be reached - `Port` - _(uint16)_ the service's port @@ -154,7 +154,7 @@ funcs: 93.176.0.0/12 - name: net.ParseIP released: v3.10.0 - deprecated: Use [`net.ParseAddr`](#net-parseaddr) instead. + deprecated: Use [`net.ParseAddr`](#netparseaddr) instead. description: | Parse the given string as an IP address (a `netaddr.IP` from the [`inet.af/netaddr`](https://pkg.go.dev/inet.af/netaddr) package). @@ -199,7 +199,7 @@ funcs: true - name: net.ParseIPPrefix released: v3.10.0 - deprecated: Use [`net.ParsePrefix`](#net-parseprefix) instead. + deprecated: Use [`net.ParsePrefix`](#netparseprefix) instead. description: | Parse the given string as an IP address prefix (CIDR) representing an IP network (a `netaddr.IPPrefix` from the @@ -257,7 +257,7 @@ funcs: [1.2.3.0/25 1.2.3.128/26 1.2.3.192/27 1.2.3.224/29 1.2.3.232/31] - name: net.ParseIPRange released: v3.10.0 - deprecated: Use [`net.ParseRange`](#net-parserange) instead. + deprecated: Use [`net.ParseRange`](#netparserange-_experimental_) instead. description: | Parse the given string as an inclusive range of IP addresses from the same address family (a `netaddr.IPRange` from the [`inet.af/netaddr`][] package). diff --git a/docs-src/content/functions/path.yml b/docs-src/content/functions/path.yml index 15a5aba3..1ffdf5e9 100644 --- a/docs-src/content/functions/path.yml +++ b/docs-src/content/functions/path.yml @@ -6,14 +6,14 @@ preamble: | This page documents the `path` namespace - see also the [`filepath`](../filepath) documentation. - These functions are wrappers for Go's [`path`](https://golang.org/pkg/path/) and [`path/filepath`](https://golang.org/pkg/path/filepath/) packages. + These functions are wrappers for Go's [`path`](https://pkg.go.dev/path/) and [`path/filepath`](https://pkg.go.dev/path/filepath/) packages. funcs: - name: path.Base released: v2.7.0 description: | Returns the last element of path. Trailing slashes are removed before extracting the last element. If the path is empty, Base returns `.`. If the path consists entirely of slashes, Base returns `/`. - A wrapper for Go's [`path.Base`](https://golang.org/pkg/path/#Base) function. + A wrapper for Go's [`path.Base`](https://pkg.go.dev/path/#Base) function. pipeline: true arguments: - name: path @@ -28,7 +28,7 @@ funcs: description: | Clean returns the shortest path name equivalent to path by purely lexical processing. - A wrapper for Go's [`path.Clean`](https://golang.org/pkg/path/#Clean) function. + A wrapper for Go's [`path.Clean`](https://pkg.go.dev/path/#Clean) function. pipeline: true arguments: - name: path @@ -43,7 +43,7 @@ funcs: description: | Returns all but the last element of path, typically the path's directory. - A wrapper for Go's [`path.Dir`](https://golang.org/pkg/path/#Dir) function. + A wrapper for Go's [`path.Dir`](https://pkg.go.dev/path/#Dir) function. pipeline: true arguments: - name: path @@ -58,7 +58,7 @@ funcs: description: | Returns the file name extension used by path. - A wrapper for Go's [`path.Ext`](https://golang.org/pkg/path/#Ext) function. + A wrapper for Go's [`path.Ext`](https://pkg.go.dev/path/#Ext) function. pipeline: true arguments: - name: path @@ -73,7 +73,7 @@ funcs: description: | Reports whether the path is absolute. - A wrapper for Go's [`path.IsAbs`](https://golang.org/pkg/path/#IsAbs) function. + A wrapper for Go's [`path.IsAbs`](https://pkg.go.dev/path/#IsAbs) function. pipeline: true arguments: - name: path @@ -90,7 +90,7 @@ funcs: description: | Joins any number of path elements into a single path, adding a separating slash if necessary. - A wrapper for Go's [`path.Join`](https://golang.org/pkg/path/#Join) function. + A wrapper for Go's [`path.Join`](https://pkg.go.dev/path/#Join) function. arguments: - name: elem... required: true @@ -104,7 +104,7 @@ funcs: description: | Reports whether name matches the shell file name pattern. - A wrapper for Go's [`path.Match`](https://golang.org/pkg/path/#Match) function. + A wrapper for Go's [`path.Match`](https://pkg.go.dev/path/#Match) function. arguments: - name: pattern required: true @@ -123,7 +123,7 @@ funcs: The function returns an array with two values, the first being the directory, and the second the file. - A wrapper for Go's [`path.Split`](https://golang.org/pkg/path/#Split) function. + A wrapper for Go's [`path.Split`](https://pkg.go.dev/path/#Split) function. pipeline: true arguments: - name: path diff --git a/docs-src/content/functions/random.yml b/docs-src/content/functions/random.yml index 9f5a0414..38e50a77 100644 --- a/docs-src/content/functions/random.yml +++ b/docs-src/content/functions/random.yml @@ -5,7 +5,7 @@ preamble: | ### About randomness - `gomplate` uses Go's [`math/rand`](https://golang.org/pkg/math/rand/) package + `gomplate` uses Go's [`math/rand`](https://pkg.go.dev/math/rand/) package to generate pseudo-random numbers. Note that these functions are not suitable for use in security-sensitive applications, such as cryptography. However, these functions will not deplete system entropy. diff --git a/docs-src/content/functions/regexp.yml b/docs-src/content/functions/regexp.yml index 85df2108..acd6ef4f 100644 --- a/docs-src/content/functions/regexp.yml +++ b/docs-src/content/functions/regexp.yml @@ -2,7 +2,7 @@ ns: regexp preamble: | These functions allow user you to search and modify text with regular expressions. - The syntax of the regular expressions accepted is [Go's `regexp` syntax](https://golang.org/pkg/regexp/syntax/#hdr-Syntax), + The syntax of the regular expressions accepted is [Go's `regexp` syntax](https://pkg.go.dev/regexp/syntax/#hdr-Syntax), and is the same general syntax used by Perl, Python, and other languages. funcs: - name: regexp.Find @@ -12,7 +12,7 @@ funcs: of the regular expression `expression`. This function provides the same behaviour as Go's - [`regexp.FindString`](https://golang.org/pkg/regexp/#Regexp.FindString) function. + [`regexp.FindString`](https://pkg.go.dev/regexp/#Regexp.FindString) function. pipeline: true arguments: - name: expression @@ -38,7 +38,7 @@ funcs: to be returned. This function provides the same behaviour as Go's - [`regexp.FindAllString`](https://golang.org/pkg/regexp/#Regexp.FindAllString) function. + [`regexp.FindAllString`](https://pkg.go.dev/regexp#Regexp.FindAllString) function. pipeline: true arguments: - name: expression @@ -81,7 +81,7 @@ funcs: Escapes all regular expression metacharacters in the input. The returned string is a regular expression matching the literal text. This function provides the same behaviour as Go's - [`regexp.QuoteMeta`](https://golang.org/pkg/regexp/#Regexp.QuoteMeta) function. + [`regexp.QuoteMeta`](https://pkg.go.dev/regexp#QuoteMeta) function. pipeline: true arguments: - name: input @@ -99,7 +99,7 @@ funcs: The replacement is substituted after expanding variables beginning with `$`. This function provides the same behaviour as Go's - [`regexp.ReplaceAllString`](https://golang.org/pkg/regexp/#Regexp.ReplaceAllString) function. + [`regexp.ReplaceAllString`](https://pkg.go.dev/regexp/#Regexp.ReplaceAllString) function. pipeline: true arguments: - name: expression @@ -127,7 +127,7 @@ funcs: beginning with `$`. This function provides the same behaviour as Go's - [`regexp.ReplaceAllLiteralString`](https://golang.org/pkg/regexp/#Regexp.ReplaceAllLiteralString) function. + [`regexp.ReplaceAllLiteralString`](https://pkg.go.dev/regexp/#Regexp.ReplaceAllLiteralString) function. pipeline: true arguments: - name: expression @@ -155,11 +155,11 @@ funcs: `n` argument (number of matches) will be set to `-1`, causing all sub-strings to be returned. - This is equivalent to [`strings.SplitN`](../strings/#strings-splitn), + This is equivalent to [`strings.SplitN`](../strings/#stringssplitn), except that regular expressions are supported. This function provides the same behaviour as Go's - [`regexp.Split`](https://golang.org/pkg/regexp/#Regexp.Split) function. + [`regexp.Split`](https://pkg.go.dev/regexp/#Regexp.Split) function. pipeline: true arguments: - name: expression diff --git a/docs-src/content/functions/sockaddr.yml b/docs-src/content/functions/sockaddr.yml index 9b3239b8..36399cfd 100644 --- a/docs-src/content/functions/sockaddr.yml +++ b/docs-src/content/functions/sockaddr.yml @@ -155,7 +155,7 @@ funcs: Returns an array of `IfAddr`s filtered by interfaces that match the given selector's value. - This is the inverse of `sockaddr.Exclude`. See [`sockaddr.Exclude`](#sockaddr.Exclude) for details. + This is the inverse of `sockaddr.Exclude`. See [`sockaddr.Exclude`](#sockaddrexclude) for details. pipeline: true arguments: - name: selector diff --git a/docs-src/content/functions/strings.yml b/docs-src/content/functions/strings.yml index 2f874ac2..07378fb0 100644 --- a/docs-src/content/functions/strings.yml +++ b/docs-src/content/functions/strings.yml @@ -6,7 +6,7 @@ funcs: description: | Abbreviates a string using `...` (ellipses). Takes an optional offset from the beginning of the string, and a maximum final width (including added ellipses). - _Also see [`strings.Trunc`](#strings-trunc)._ + _Also see [`strings.Trunc`](#stringstrunc)._ pipeline: true arguments: - name: offset @@ -133,7 +133,7 @@ funcs: ``` - name: strings.Sort released: v2.7.0 - deprecated: Use [`coll.Sort`](../coll/#coll-sort) instead + deprecated: Use [`coll.Sort`](../coll/#collsort) instead description: | Returns an alphanumerically-sorted copy of a given string list. pipeline: true @@ -172,7 +172,7 @@ funcs: - name: strings.Split released: v1.9.0 description: | - _Not to be confused with [`split`](#split), which is deprecated._ + _Not to be confused with [`split`](#split-_deprecated_), which is deprecated._ Slices `input` into the substrings separated by `separator`, returning a slice of the substrings between those separators. If `input` does not @@ -183,7 +183,7 @@ funcs: both inputs are empty (i.e. `strings.Split "" ""`), it will return an empty slice. - This is equivalent to [`strings.SplitN`](#strings-splitn) with a `count` + This is equivalent to [`strings.SplitN`](#stringssplitn) with a `count` of `-1`. Note that the delimiter is not included in the resulting elements. @@ -210,7 +210,7 @@ funcs: - name: strings.SplitN released: v1.9.0 description: | - _Not to be confused with [`splitN`](#splitn), which is deprecated._ + _Not to be confused with [`splitN`](#splitn-_deprecated_), which is deprecated._ Slices `input` into the substrings separated by `separator`, returning a slice of the substrings between those separators. If `input` does not @@ -224,7 +224,7 @@ funcs: * `count == 0`: the result is nil (zero substrings) * `count < 0`: all substrings - See [`strings.Split`](#strings-split) for more details. + See [`strings.Split`](#stringssplit) for more details. pipeline: true arguments: - name: separator @@ -273,7 +273,7 @@ funcs: It errors if `count` is negative or if the length of `input` multiplied by `count` overflows. - This wraps Go's [`strings.Repeat`](https://golang.org/pkg/strings/#Repeat). + This wraps Go's [`strings.Repeat`](https://pkg.go.dev/strings/#Repeat). pipeline: true arguments: - name: count @@ -426,7 +426,7 @@ funcs: description: | Returns a string without the provided leading prefix string, if the prefix is present. - This wraps Go's [`strings.TrimPrefix`](https://golang.org/pkg/strings/#TrimPrefix). + This wraps Go's [`strings.TrimPrefix`](https://pkg.go.dev/strings/#TrimPrefix). pipeline: true arguments: - name: prefix @@ -459,7 +459,7 @@ funcs: description: | Returns a string without the provided trailing suffix string, if the suffix is present. - This wraps Go's [`strings.TrimSuffix`](https://golang.org/pkg/strings/#TrimSuffix). + This wraps Go's [`strings.TrimSuffix`](https://pkg.go.dev/strings/#TrimSuffix). pipeline: true arguments: - name: suffix @@ -477,7 +477,7 @@ funcs: description: | Returns a string truncated to the given length. - _Also see [`strings.Abbrev`](#strings-abbrev)._ + _Also see [`strings.Abbrev`](#stringsabbrev)._ pipeline: true arguments: - name: length @@ -594,7 +594,7 @@ funcs: Inputs will first be converted to strings, and multiple inputs are concatenated. - This wraps Go's [`utf8.RuneCountInString`](https://golang.org/pkg/unicode/utf8/#RuneCountInString) + This wraps Go's [`utf8.RuneCountInString`](https://pkg.go.dev/unicode/utf8/#RuneCountInString) function. pipeline: true arguments: @@ -608,13 +608,13 @@ funcs: 0 is 1 bytes and 1 runes ᐰ is 3 bytes and 1 runes - name: contains - deprecated: Use [`strings.Contains`](#strings-contains) instead + deprecated: Use [`strings.Contains`](#stringscontains) instead released: v1.4.0 description: | - **See [`strings.Contains`](#strings-contains) for a pipeline-compatible version** + **See [`strings.Contains`](#stringscontains) for a pipeline-compatible version** Contains reports whether the second string is contained within the first. Equivalent to - [strings.Contains](https://golang.org/pkg/strings#Contains) + [strings.Contains](https://pkg.go.dev/strings#Contains) pipeline: false arguments: - name: input @@ -637,13 +637,13 @@ funcs: no ``` - name: hasPrefix - deprecated: Use [`strings.HasPrefix`](#strings-hasprefix) instead + deprecated: Use [`strings.HasPrefix`](#stringshasprefix) instead released: v1.4.0 description: | - **See [`strings.HasPrefix`](#strings-hasprefix) for a pipeline-compatible version** + **See [`strings.HasPrefix`](#stringshasprefix) for a pipeline-compatible version** Tests whether the string begins with a certain substring. Equivalent to - [strings.HasPrefix](https://golang.org/pkg/strings#HasPrefix) + [strings.HasPrefix](https://pkg.go.dev/strings#HasPrefix) pipeline: false arguments: - name: input @@ -666,13 +666,13 @@ funcs: foo ``` - name: hasSuffix - deprecated: Use [`strings.HasSuffix`](#strings-hassuffix) instead + deprecated: Use [`strings.HasSuffix`](#stringshassuffix) instead released: v1.4.0 description: | - **See [`strings.HasSuffix`](#strings-hassuffix) for a pipeline-compatible version** + **See [`strings.HasSuffix`](#stringshassuffix) for a pipeline-compatible version** Tests whether the string ends with a certain substring. Equivalent to - [strings.HasSuffix](https://golang.org/pkg/strings#HasSuffix) + [strings.HasSuffix](https://pkg.go.dev/strings#HasSuffix) pipeline: false arguments: - name: input @@ -693,13 +693,13 @@ funcs: http://example.com:80 ``` - name: split - deprecated: Use [`strings.Split`](#strings-split) instead + deprecated: Use [`strings.Split`](#stringssplit) instead released: v1.4.0 description: | - **See [`strings.Split`](#strings-split) for a pipeline-compatible version** + **See [`strings.Split`](#stringssplit) for a pipeline-compatible version** Creates a slice by splitting a string on a given delimiter. Equivalent to - [strings.Split](https://golang.org/pkg/strings#Split) + [strings.Split](https://pkg.go.dev/strings#Split) pipeline: false arguments: - name: input @@ -716,13 +716,13 @@ funcs: Hello, Lisa Hello, Maggie - name: splitN - deprecated: Use [`strings.SplitN`](#strings-splitn) instead + deprecated: Use [`strings.SplitN`](#stringssplitn) instead released: v1.7.0 description: | - **See [`strings.SplitN`](#strings-splitn) for a pipeline-compatible version** + **See [`strings.SplitN`](#stringssplitn) for a pipeline-compatible version** Creates a slice by splitting a string on a given delimiter. The count determines - the number of substrings to return. Equivalent to [strings.SplitN](https://golang.org/pkg/strings#SplitN) + the number of substrings to return. Equivalent to [strings.SplitN](https://pkg.go.dev/strings#SplitN) pipeline: false arguments: - name: input @@ -741,13 +741,13 @@ funcs: foo bar:baz - name: trim - deprecated: Use [`strings.Trim`](#strings-trim) instead + deprecated: Use [`strings.Trim`](#stringstrim) instead released: v1.4.0 description: | - **See [`strings.Trim`](#strings-trim) for a pipeline-compatible version** + **See [`strings.Trim`](#stringstrim) for a pipeline-compatible version** Trims a string by removing the given characters from the beginning and end of - the string. Equivalent to [strings.Trim](https://golang.org/pkg/strings/#Trim) + the string. Equivalent to [strings.Trim](https://pkg.go.dev/strings/#Trim) pipeline: false arguments: - name: input diff --git a/docs-src/content/functions/test.yml b/docs-src/content/functions/test.yml index 09bd1b02..7d312e26 100644 --- a/docs-src/content/functions/test.yml +++ b/docs-src/content/functions/test.yml @@ -61,7 +61,7 @@ funcs: represent _any_ numeric kind (whether `float32`, `uint8`, or whatever). This is useful when the specific numeric type is unknown. - See also [`test.Kind`](test-kind). + See also [`test.Kind`](#testkind). pipeline: true arguments: - name: kind @@ -99,7 +99,7 @@ funcs: If you need to know the precise type of a value, use `printf "%T" $value`. - See also [`test.IsKind`](test-iskind). + See also [`test.IsKind`](#testiskind). pipeline: true arguments: - name: value @@ -156,7 +156,7 @@ funcs: alias: ternary released: v3.1.0 description: | - Returns one of two values depending on whether the third is true. Note that the third value does not have to be a boolean - it is converted first by the [`conv.ToBool`](../conv/#conv-tobool) function (values like `true`, `1`, `"true"`, `"Yes"`, etc... are considered true). + Returns one of two values depending on whether the third is true. Note that the third value does not have to be a boolean - it is converted first by the [`conv.ToBool`](../conv/#convtobool) function (values like `true`, `1`, `"true"`, `"Yes"`, etc... are considered true). This is effectively a short-form of the following template: diff --git a/docs-src/content/functions/time.yml b/docs-src/content/functions/time.yml index bc7b1e32..ddef213e 100644 --- a/docs-src/content/functions/time.yml +++ b/docs-src/content/functions/time.yml @@ -1,8 +1,8 @@ ns: time preamble: | - This namespace wraps Go's [`time` package](https://golang.org/pkg/time/), and a + This namespace wraps Go's [`time` package](https://pkg.go.dev/time/), and a few of the functions return a `time.Time` value. All of the - [`time.Time` functions](https://golang.org/pkg/time/#Time) can then be used to + [`time.Time` functions](https://pkg.go.dev/time/#Time) can then be used to convert, adjust, or format the time in your template. ### Reference time @@ -46,9 +46,9 @@ preamble: | #### durations - Some operations (such as [`Time.Add`](https://golang.org/pkg/time/#Time.Add) and - [`Time.Round`](https://golang.org/pkg/time/#Time.Round)) require a - [`Duration`](https://golang.org/pkg/time/#Duration) value. These can be created + Some operations (such as [`Time.Add`](https://pkg.go.dev/time/#Time.Add) and + [`Time.Round`](https://pkg.go.dev/time/#Time.Round)) require a + [`Duration`](https://pkg.go.dev/time/#Duration) value. These can be created conveniently with the following functions: - `time.Nanosecond` @@ -67,24 +67,24 @@ preamble: | 11:05AM ``` - For other durations, such as `2h10m`, [`time.ParseDuration`](#time-parseduration) can be used. + For other durations, such as `2h10m`, [`time.ParseDuration`](#timeparseduration) can be used. funcs: - name: time.Now released: v2.1.0 description: | - Returns the current local time, as a `time.Time`. This wraps [`time.Now`](https://golang.org/pkg/time/#Now). + Returns the current local time, as a `time.Time`. This wraps [`time.Now`](https://pkg.go.dev/time/#Now). Usually, further functions are called using the value returned by `Now`. pipeline: false rawExamples: - | - Usage with [`UTC`](https://golang.org/pkg/time/#Time.UTC) and [`Format`](https://golang.org/pkg/time/#Time.Format): + Usage with [`UTC`](https://pkg.go.dev/time/#Time.UTC) and [`Format`](https://pkg.go.dev/time/#Time.Format): ```console $ gomplate -i '{{ (time.Now).UTC.Format "Day 2 of month 1 in year 2006 (timezone MST)" }}' Day 14 of month 10 in year 2017 (timezone UTC) ``` - | - Usage with [`AddDate`](https://golang.org/pkg/time/#Time.AddDate): + Usage with [`AddDate`](https://pkg.go.dev/time/#Time.AddDate): ```console $ date Sat Oct 14 09:57:02 EDT 2017 @@ -94,7 +94,7 @@ funcs: _(notice how the TZ adjusted for daylight savings!)_ - | - Usage with [`IsDST`](https://golang.org/pkg/time/#Time.IsDST): + Usage with [`IsDST`](https://pkg.go.dev/time/#Time.IsDST): ```console $ gomplate -i '{{ $t := time.Now }}At the tone, the time will be {{ ($t.Round (time.Minute 1)).Add (time.Minute 1) }}. It is{{ if not $t.IsDST }} not{{ end }} daylight savings time. @@ -106,12 +106,12 @@ funcs: - name: time.Parse released: v2.1.0 description: | - Parses a timestamp defined by the given layout. This wraps [`time.Parse`](https://golang.org/pkg/time/#Parse). + Parses a timestamp defined by the given layout. This wraps [`time.Parse`](https://pkg.go.dev/time/#Parse). A number of pre-defined layouts are provided as constants, defined - [here](https://golang.org/pkg/time/#pkg-constants). + [here](https://pkg.go.dev/time/#pkg-constants). - Just like [`time.Now`](#time-now), this is usually used in conjunction with + Just like [`time.Now`](#timenow), this is usually used in conjunction with other functions. _Note: In the absence of a time zone indicator, `time.Parse` returns a time in UTC._ @@ -125,7 +125,7 @@ funcs: description: The timestamp to parse rawExamples: - | - Usage with [`Format`](https://golang.org/pkg/time/#Time.Format): + Usage with [`Format`](https://pkg.go.dev/time/#Time.Format): ```console $ gomplate -i '{{ (time.Parse "2006-01-02" "1993-10-23").Format "Monday January 2, 2006 MST" }}' Saturday October 23, 1993 UTC @@ -133,7 +133,7 @@ funcs: - name: time.ParseDuration released: v2.1.0 description: | - Parses a duration string. This wraps [`time.ParseDuration`](https://golang.org/pkg/time/#ParseDuration). + Parses a duration string. This wraps [`time.ParseDuration`](https://pkg.go.dev/time/#ParseDuration). A duration string is a possibly signed sequence of decimal numbers, each with optional fraction and a unit suffix, such as `300ms`, `-1.5h` or `2h45m`. Valid @@ -152,7 +152,7 @@ funcs: - name: time.ParseLocal released: v2.2.0 description: | - Same as [`time.Parse`](#time-parse), except that in the absence of a time zone + Same as [`time.Parse`](#timeparse), except that in the absence of a time zone indicator, the timestamp wil be parsed in the local timezone. pipeline: true arguments: @@ -164,7 +164,7 @@ funcs: description: The timestamp to parse rawExamples: - | - Usage with [`Format`](https://golang.org/pkg/time/#Time.Format): + Usage with [`Format`](https://pkg.go.dev/time/#Time.Format): ```console $ bin/gomplate -i '{{ (time.ParseLocal time.Kitchen "6:00AM").Format "15:04 MST" }}' 06:00 EST @@ -172,9 +172,9 @@ funcs: - name: time.ParseInLocation released: v2.2.0 description: | - Same as [`time.Parse`](#time-parse), except that the time is parsed in the given location's time zone. + Same as [`time.Parse`](#timeparse), except that the time is parsed in the given location's time zone. - This wraps [`time.ParseInLocation`](https://golang.org/pkg/time/#ParseInLocation). + This wraps [`time.ParseInLocation`](https://pkg.go.dev/time/#ParseInLocation). pipeline: true arguments: - name: layout @@ -188,7 +188,7 @@ funcs: description: The timestamp to parse rawExamples: - | - Usage with [`Format`](https://golang.org/pkg/time/#Time.Format): + Usage with [`Format`](https://pkg.go.dev/time/#Time.Format): ```console $ gomplate -i '{{ (time.ParseInLocation time.Kitchen "Africa/Luanda" "6:00AM").Format "15:04 MST" }}' 06:00 LMT @@ -196,7 +196,7 @@ funcs: - name: time.Since released: v2.5.0 description: | - Returns the time elapsed since a given time. This wraps [`time.Since`](https://golang.org/pkg/time/#Since). + Returns the time elapsed since a given time. This wraps [`time.Since`](https://pkg.go.dev/time/#Since). It is shorthand for `time.Now.Sub t`. pipeline: true @@ -235,7 +235,7 @@ funcs: - name: time.Until released: v2.5.0 description: | - Returns the duration until a given time. This wraps [`time.Until`](https://golang.org/pkg/time/#Until). + Returns the duration until a given time. This wraps [`time.Until`](https://pkg.go.dev/time/#Until). It is shorthand for `$t.Sub time.Now`. pipeline: true diff --git a/docs-src/content/functions/tmpl.yml b/docs-src/content/functions/tmpl.yml index 54791dc6..5b4e3683 100644 --- a/docs-src/content/functions/tmpl.yml +++ b/docs-src/content/functions/tmpl.yml @@ -6,7 +6,7 @@ funcs: - name: tmpl.Exec released: v3.3.0 description: | - Execute (render) the named template. This is equivalent to using the [`template`](https://golang.org/pkg/text/template/#hdr-Actions) action, except the result is returned as a string. + Execute (render) the named template. This is equivalent to using the [`template`](https://pkg.go.dev/text/template/#hdr-Actions) action, except the result is returned as a string. This allows for post-processing of templates. pipeline: true diff --git a/docs-src/content/functions/uuid.yml b/docs-src/content/functions/uuid.yml index 09c8d48d..ddd9951a 100644 --- a/docs-src/content/functions/uuid.yml +++ b/docs-src/content/functions/uuid.yml @@ -18,7 +18,7 @@ funcs: description: | Create a version 1 UUID (based on the current MAC address and the current date/time). - Use [`uuid.V4`](#uuid-v4) instead in most cases. + Use [`uuid.V4`](#uuidv4) instead in most cases. pipeline: false examples: - | |
