From deeabb72b0a1c079e6691bd45c3cd64fed9fac0d Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Tue, 24 Sep 2024 09:12:17 +0200 Subject: [PATCH 1/7] add action --- .github/workflows/cron.yaml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cron.yaml b/.github/workflows/cron.yaml index ce56c315..725b551f 100644 --- a/.github/workflows/cron.yaml +++ b/.github/workflows/cron.yaml @@ -1,10 +1,10 @@ -name: Refresh Operator Docs +name: Refresh Docs on: schedule: - cron: '0 0 * * *' jobs: - gendocs: + operator-docs: runs-on: ubuntu-latest permissions: contents: 'write' @@ -25,4 +25,23 @@ jobs: commit-message: Update docs for operator branch: docs-${{steps.date.outputs.date}} labels: release - base: main \ No newline at end of file + base: main + liquid-docs: + runs-on: ubuntu-latest + permissions: + contents: 'write' + id-token: 'write' + pull-requests: 'write' + steps: + - uses: actions/checkout@v3 + - run: make liquid-docs + - id: date + run: echo "date=$(date +%Y%m%d%H%M%S)" >> $GITHUB_OUTPUT + - uses: peter-evans/create-pull-request@v5 + with: + title: "docs: Update supported Liquid filters docs" + body: Automated pull request to regenerate supported Liquid filters docs. + commit-message: update supported Liquid filters docs + branch: docs-${{steps.date.outputs.date}} + labels: enhancement + base: main \ No newline at end of file From 9920ce77e138705384ce7b8bbf6471d0de9d4d3a Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Tue, 24 Sep 2024 09:19:53 +0200 Subject: [PATCH 2/7] add make target --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c8114cf4..bb7a2a36 100644 --- a/Makefile +++ b/Makefile @@ -10,4 +10,7 @@ web: ## runs the docs site locally yarn dev crd-docs: - curl -L https://raw.githubusercontent.com/pluralsh/console/master/go/controller/docs/api.md --output pages/deployments/operator/api.md \ No newline at end of file + curl -L https://raw.githubusercontent.com/pluralsh/console/master/go/controller/docs/api.md --output pages/deployments/operator/api.md + +liquid-docs: + curl -L https://raw.githubusercontent.com/pluralsh/polly/main/docs/liquid-filters.md --output pages/deployments/templating-filters.md \ No newline at end of file From ef019a8405f9b44d9ec10982643536e4e9922a49 Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Tue, 24 Sep 2024 09:20:03 +0200 Subject: [PATCH 3/7] download docs --- pages/deployments/templating-filters.md | 1457 +++++++++++++++++++++++ 1 file changed, 1457 insertions(+) create mode 100644 pages/deployments/templating-filters.md diff --git a/pages/deployments/templating-filters.md b/pages/deployments/templating-filters.md new file mode 100644 index 00000000..e4cf3709 --- /dev/null +++ b/pages/deployments/templating-filters.md @@ -0,0 +1,1457 @@ +# Supported Liquid Filters + +## abbrev + + + + +_Implementation_: github.com/Masterminds/sprig/v3.abbrev + +## abbrevboth + + + + +_Implementation_: github.com/Masterminds/sprig/v3.abbrevboth + +## add +Sums numbers. Accepts two or more inputs. `add 1 2 3` will return `6`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func15 + +## add1 +Increments by 1. `add1 3` will return `4`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func14 + +## add1f +Increments float number by 1. + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func21 + +## addf +Sums float numbers. + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func22 + +## adler32sum +Receives a string and computes its Adler-32 checksum. + + + +_Implementation_: github.com/Masterminds/sprig/v3.adler32sum + +## ago +Returns duration from current time in seconds resolution. + + + +_Implementation_: github.com/Masterminds/sprig/v3.dateAgo + +## all +Takes a list of values ad returns true if all values are non-empty. + + + +_Implementation_: github.com/Masterminds/sprig/v3.all + +## any +Takes a list of values ad returns true if any values are non-empty. + + + +_Implementation_: github.com/Masterminds/sprig/v3.any + +## append +Appends a new item to existing list, creating a new list. + + + +_Implementation_: github.com/Masterminds/sprig/v3.push + +## atoi +Converts a string to an integer. + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func12 + +## b32dec +Decodes string from Base32 format. + + + +_Implementation_: github.com/Masterminds/sprig/v3.base32decode + +## b32enc +Encodes string with Base32 format. + + + +_Implementation_: github.com/Masterminds/sprig/v3.base32encode + +## b64dec +Decodes string from Base64 format. + + + +_Implementation_: github.com/Masterminds/sprig/v3.base64decode + +## b64enc +Encodes string with Base64 format. + + + +_Implementation_: github.com/Masterminds/sprig/v3.base64encode + +## base + + + + +_Implementation_: path.Base + +## bcrypt +Receives a string and generates its bcrypt hash. + + + +_Implementation_: github.com/Masterminds/sprig/v3.bcrypt + +## biggest + + + + +_Implementation_: github.com/Masterminds/sprig/v3.max + +## buildCustomCert +Allows customizing the certificate. It takes Base64 encoded PEM format certificate and private key as arguments and returns object with PEM-encoded certificate and key. Note that the returned object can be passed to the `genSignedCert` function to sign a certificate using this CA. + + + +_Implementation_: github.com/Masterminds/sprig/v3.buildCustomCertificate + +## camelcase + + + + +_Implementation_: github.com/huandu/xstrings.ToPascalCase + +## cat + + + + +_Implementation_: github.com/Masterminds/sprig/v3.cat + +## ceil +Returns greatest float value greater than or equal to input value. `ceil 123.001` will return `124.0`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.ceil + +## chunk + + + + +_Implementation_: github.com/Masterminds/sprig/v3.chunk + +## clean + + + + +_Implementation_: path.Clean + +## coalesce + + + + +_Implementation_: github.com/Masterminds/sprig/v3.coalesce + +## compact +Accepts a list and removes entries with empty values. + + + +_Implementation_: github.com/Masterminds/sprig/v3.compact + +## concat +Concatenates arbitrary number of lists into one. + + + +_Implementation_: github.com/Masterminds/sprig/v3.concat + +## contains +Tests if one string is contained inside of another. `contains "cat" "catch"` will return `true`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func9 + +## date +Formats date. + + + +_Implementation_: github.com/Masterminds/sprig/v3.date + +## dateInZone +Same as `date` but with a timezone. + + + +_Implementation_: github.com/Masterminds/sprig/v3.dateInZone + +## dateModify + + + + +_Implementation_: github.com/Masterminds/sprig/v3.dateModify + +## date_in_zone + + + + +_Implementation_: github.com/Masterminds/sprig/v3.dateInZone + +## date_modify + + + + +_Implementation_: github.com/Masterminds/sprig/v3.dateModify + +## decryptAES +Receives a Base64 string encoded by the AES-256 CBC algorithm and returns the decoded text. + + + +_Implementation_: github.com/Masterminds/sprig/v3.decryptAES + +## deepCopy + + + + +_Implementation_: github.com/Masterminds/sprig/v3.deepCopy + +## deepEqual + + + + +_Implementation_: reflect.DeepEqual + +## default + + + + +_Implementation_: github.com/pluralsh/polly/template.dfault + +## derivePassword + + + + +_Implementation_: github.com/Masterminds/sprig/v3.derivePassword + +## dict + + + + +_Implementation_: github.com/Masterminds/sprig/v3.dict + +## dig + + + + +_Implementation_: github.com/Masterminds/sprig/v3.dig + +## dir + + + + +_Implementation_: path.Dir + +## div +Performs integer division. + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func17 + +## divf + + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func24 + +## duration +Formats a given amount of seconds as a `time.Duration`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.duration + +## durationRound + + + + +_Implementation_: github.com/Masterminds/sprig/v3.durationRound + +## empty + + + + +_Implementation_: github.com/Masterminds/sprig/v3.empty + +## encryptAES +Encrypts text with AES-256 CBC and returns a Base64 encoded string. + + + +_Implementation_: github.com/Masterminds/sprig/v3.encryptAES + +## env +Reads environment variable. + + + +_Implementation_: os.Getenv + +## expandenv +Substitutes environment variable in a string. + + + +_Implementation_: os.ExpandEnv + +## ext +Returns file extension. `ext "foo.bar"` will return `"bar"`. + + + +_Implementation_: path.Ext + +## fail +Unconditionally returns an empty string and an error with the specified text. This is useful in scenarios where other conditionals have determined that template rendering should fail. + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func26 + +## first +Returns head item on a list. + + + +_Implementation_: github.com/Masterminds/sprig/v3.first + +## float64 +Converts to a `float64`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.toFloat64 + +## floor +Returns the greatest float value greater than or equal to input value. `floor 123.9999` will return `123.0`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.floor + +## fromJson + + +_Aliases_: from_json + +_Implementation_: github.com/Masterminds/sprig/v3.fromJson + +## genCA +Generates a new, self-signed x509 SSL Certificate Authority using 2048-bit RSA private key. It takes subject common name (CN) and cert validity duration in days as parameters. It returns object with PEM-encoded certificate and key. Note that the returned object can be passed to the `genSignedCert` function to sign a certificate using this CA. + + + +_Implementation_: github.com/Masterminds/sprig/v3.generateCertificateAuthority + +## genCAWithKey +Generates a new, self-signed x509 SSL Certificate Authority using given private key. It takes subject common name (CN), cert validity duration in days and private key (PEM-encoded; DSA keys are not supported) as parameters. It returns object with PEM-encoded certificate and key. Note that the returned object can be passed to the `genSignedCert` function to sign a certificate using this CA. + + + +_Implementation_: github.com/Masterminds/sprig/v3.generateCertificateAuthorityWithPEMKey + +## genPrivateKey + + + + +_Implementation_: github.com/Masterminds/sprig/v3.generatePrivateKey + +## genSelfSignedCert +Generates an SSL self-signed certificate. + + + +_Implementation_: github.com/Masterminds/sprig/v3.generateSelfSignedCertificate + +## genSelfSignedCertWithKey + + + + +_Implementation_: github.com/Masterminds/sprig/v3.generateSelfSignedCertificateWithPEMKey + +## genSignedCert +Generates an SSL certificate and key based on a given CA. + + + +_Implementation_: github.com/Masterminds/sprig/v3.generateSignedCertificate + +## genSignedCertWithKey + + + + +_Implementation_: github.com/Masterminds/sprig/v3.generateSignedCertificateWithPEMKey + +## get + + + + +_Implementation_: github.com/Masterminds/sprig/v3.get + +## getHostByName + + + + +_Implementation_: github.com/Masterminds/sprig/v3.getHostByName + +## has +Checks if a list has a particular element. + + + +_Implementation_: github.com/Masterminds/sprig/v3.has + +## hasKey + + + + +_Implementation_: github.com/Masterminds/sprig/v3.hasKey + +## hasPrefix + + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func10 + +## hasSuffix + + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func11 + +## htmlDate +Formats a date for inserting into HTML date picker input field. + + + +_Implementation_: github.com/Masterminds/sprig/v3.htmlDate + +## htmlDateInZone +Same as `htmlDate` but with a timezone. + + + +_Implementation_: github.com/Masterminds/sprig/v3.htmlDateInZone + +## htpasswd + + + + +_Implementation_: github.com/Masterminds/sprig/v3.htpasswd + +## indent + + + + +_Implementation_: github.com/pluralsh/polly/template.indent + +## initial +Compliments `last` by retuning all but the last element. + + + +_Implementation_: github.com/Masterminds/sprig/v3.initial + +## initials + + + + +_Implementation_: github.com/Masterminds/sprig/v3.initials + +## int +Converts to a `int`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.toInt + +## int64 +Converts to a `int64`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.toInt64 + +## isAbs +Checks whether a path is absolute. + + + +_Implementation_: path.IsAbs + +## join + + + + +_Implementation_: github.com/Masterminds/sprig/v3.join + +## kebabcase + + + + +_Implementation_: github.com/huandu/xstrings.ToKebabCase + +## keys + + + + +_Implementation_: github.com/Masterminds/sprig/v3.keys + +## kindIs + + + + +_Implementation_: github.com/Masterminds/sprig/v3.kindIs + +## kindOf + + + + +_Implementation_: github.com/Masterminds/sprig/v3.kindOf + +## last + + + + +_Implementation_: github.com/Masterminds/sprig/v3.last + +## list + + + + +_Implementation_: github.com/Masterminds/sprig/v3.list + +## lower +Converts the entire string to lowercase. `upper "HELLO"` will return `hello`. + + + +_Implementation_: strings.ToLower + +## max +Returns the largest of a series of integers. `max 1 2 3` will return `3`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.max + +## maxf + + + + +_Implementation_: github.com/Masterminds/sprig/v3.maxf + +## merge + + + + +_Implementation_: github.com/Masterminds/sprig/v3.merge + +## mergeOverwrite + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mergeOverwrite + +## min +Returns the smallest of a series of integers. `min 1 2 3` will return `1`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.min + +## minf + + + + +_Implementation_: github.com/Masterminds/sprig/v3.minf + +## mod + + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func18 + +## mul +Multiples numbers. Accepts two or more inputs. `mul 1 2 3` will return `6`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func19 + +## mulf + + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func25 + +## mustAppend +Appends a new item to existing list, creating a new list. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustPush + +## mustChunk + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustChunk + +## mustCompact +Accepts a list and removes entries with empty values. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustCompact + +## mustDateModify + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustDateModify + +## mustDeepCopy + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustDeepCopy + +## mustFirst +Returns head item on a list. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustFirst + +## mustFromJson + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustFromJson + +## mustHas +Checks if a list has a particular element. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustHas + +## mustInitial +Compliments `last` by retuning all but the last element. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustInitial + +## mustLast + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustLast + +## mustMerge + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustMerge + +## mustMergeOverwrite + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustMergeOverwrite + +## mustPrepend + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustPrepend + +## mustPush + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustPush + +## mustRegexFind + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustRegexFind + +## mustRegexFindAll + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustRegexFindAll + +## mustRegexMatch + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustRegexMatch + +## mustRegexReplaceAll + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustRegexReplaceAll + +## mustRegexReplaceAllLiteral + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustRegexReplaceAllLiteral + +## mustRegexSplit + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustRegexSplit + +## mustRest +Gets tail of the list (everything but the first item). Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustRest + +## mustReverse +Produces a new list with the reversed elements of the given list. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustReverse + +## mustSlice + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustSlice + +## mustToDate +Converts a string to a date. The first argument is the date layout and the second is the date string. If the string can’t be converted it returns the zero value. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustToDate + +## mustToJson + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustToJson + +## mustToPrettyJson + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustToPrettyJson + +## mustToRawJson + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustToRawJson + +## mustUniq +Generates a list with all of the duplicates removed. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustUniq + +## mustWithout +Filters items out of a list. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustWithout + +## must_date_modify + + + + +_Implementation_: github.com/Masterminds/sprig/v3.mustDateModify + +## nindent + + + + +_Implementation_: github.com/pluralsh/polly/template.nindent + +## nospace +Removes all whitespace from a string. `nospace "hello w o r l d"` will return `helloworld`. + + + +_Implementation_: github.com/Masterminds/goutils.DeleteWhiteSpace + +## omit + + + + +_Implementation_: github.com/Masterminds/sprig/v3.omit + +## osBase +Returns the last element of a file path. `osBase "/foo/bar/baz"` and `osBase "C:\\foo\\bar\\baz"` will return `"baz"` on Linux and Windows, respectively. + + + +_Implementation_: path/filepath.Base + +## osClean +Cleans up a path. `osClean "/foo/bar/../baz"` and `osClean "C:\\foo\\bar\\..\\baz"` will resolve the `..` and return `foo/baz` on Linux and `C:\foo\baz` on Windows. + + + +_Implementation_: path/filepath.Clean + +## osDir +Returns the directory, stripping the last part of the path. So `osDir "/foo/bar/baz"` returns `/foo/bar` on Linux, and `osDir "C:\\foo\\bar\\baz"` returns `C:\\foo\\bar` on Windows. + + + +_Implementation_: path/filepath.Dir + +## osExt +Return the file extension. `osExt "/foo.bar"` and `osExt "C:\\foo.bar"` will return `.bar` on Linux and Windows, respectively. + + + +_Implementation_: path/filepath.Ext + +## osIsAbs +Checks whether a file path is absolute. + + + +_Implementation_: path/filepath.IsAbs + +## pick + + + + +_Implementation_: github.com/Masterminds/sprig/v3.pick + +## pluck + + + + +_Implementation_: github.com/Masterminds/sprig/v3.pluck + +## plural + + + + +_Implementation_: github.com/Masterminds/sprig/v3.plural + +## prepend + + + + +_Implementation_: github.com/Masterminds/sprig/v3.prepend + +## push + + + + +_Implementation_: github.com/Masterminds/sprig/v3.push + +## quote + + + + +_Implementation_: github.com/Masterminds/sprig/v3.quote + +## randAlpha + + + + +_Implementation_: github.com/Masterminds/sprig/v3.randAlpha + +## randAlphaNum + + + + +_Implementation_: github.com/Masterminds/sprig/v3.randAlphaNumeric + +## randAscii + + + + +_Implementation_: github.com/Masterminds/sprig/v3.randAscii + +## randBytes +Accepts a count `N` and generates cryptographically secure random sequence of `N` bytes. The sequence is returned as a Base64 encoded string. + + + +_Implementation_: github.com/Masterminds/sprig/v3.randBytes + +## randInt +Returns a random integer value from min (inclusive) to max (exclusive). `randInt 12 30` will produce a random number in the range from 12 to 30. + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func20 + +## randNumeric + + + + +_Implementation_: github.com/Masterminds/sprig/v3.randNumeric + +## regexFind + + + + +_Implementation_: github.com/Masterminds/sprig/v3.regexFind + +## regexFindAll + + + + +_Implementation_: github.com/Masterminds/sprig/v3.regexFindAll + +## regexMatch + + + + +_Implementation_: github.com/Masterminds/sprig/v3.regexMatch + +## regexQuoteMeta + + + + +_Implementation_: github.com/Masterminds/sprig/v3.regexQuoteMeta + +## regexReplaceAll + + + + +_Implementation_: github.com/Masterminds/sprig/v3.regexReplaceAll + +## regexReplaceAllLiteral + + + + +_Implementation_: github.com/Masterminds/sprig/v3.regexReplaceAllLiteral + +## regexSplit + + + + +_Implementation_: github.com/Masterminds/sprig/v3.regexSplit + +## repeat + + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func2 + +## replace + + + + +_Implementation_: strings.ReplaceAll + +## rest +Gets tail of the list (everything but the first item). + + + +_Implementation_: github.com/Masterminds/sprig/v3.rest + +## reverse +Produces a new list with the reversed elements of the given list. + + + +_Implementation_: github.com/Masterminds/sprig/v3.reverse + +## round +Returns a float value with the remainder rounded to the given number to digits after the decimal point. `round 123.55555 3` will return `123.556`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.round + +## semver + + + + +_Implementation_: github.com/Masterminds/sprig/v3.semver + +## semverCompare + + +_Aliases_: semver_compare + +_Implementation_: github.com/Masterminds/sprig/v3.semverCompare + +## seq +Works like Bash `seq` command. Specify 1 parameter (`end`) to generate all counting integers between 1 and `end` inclusive. Specify 2 parameters (`start` and `end`) to generate all counting integers between `start` and `end` inclusive incrementing or decrementing by 1. Specify 3 parameters (`start`, `step` and `end`) to generate all counting integers between `start` and `end` inclusive incrementing or decrementing by `step`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.seq + +## set + + + + +_Implementation_: github.com/Masterminds/sprig/v3.set + +## sha1sum + + + + +_Implementation_: github.com/Masterminds/sprig/v3.sha1sum + +## sha256sum + + +_Aliases_: sha26sum + +_Implementation_: github.com/Masterminds/sprig/v3.sha256sum + +## sha512sum + + + + +_Implementation_: github.com/Masterminds/sprig/v3.sha512sum + +## shuffle + + + + +_Implementation_: github.com/huandu/xstrings.Shuffle + +## slice + + + + +_Implementation_: github.com/Masterminds/sprig/v3.slice + +## snakecase + + + + +_Implementation_: github.com/huandu/xstrings.ToSnakeCase + +## sortAlpha + + + + +_Implementation_: github.com/Masterminds/sprig/v3.sortAlpha + +## split + + + + +_Implementation_: github.com/Masterminds/sprig/v3.split + +## splitList + + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func13 + +## splitn + + + + +_Implementation_: github.com/Masterminds/sprig/v3.splitn + +## squote + + + + +_Implementation_: github.com/Masterminds/sprig/v3.squote + +## sub + + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func16 + +## subf + + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func23 + +## substr + + + + +_Implementation_: github.com/Masterminds/sprig/v3.substring + +## swapcase + + + + +_Implementation_: github.com/Masterminds/goutils.SwapCase + +## ternary +Takes two values and a test value. If the test value is true, the first value will be returned. If the test value is false, the second value will be returned. This is similar to the C ternary operator. `ternary "foo" "bar" true` or `true | "foo" "bar"` will return `"foo"`. + + + +_Implementation_: github.com/pluralsh/polly/template.ternary + +## title +Converts a string to title case. `title "hello world"` will return `"Hello World"`. + + + +_Implementation_: strings.Title + +## toDate +Converts a string to a date. The first argument is the date layout and the second is the date string. If the string can’t be converted it returns the zero value. + + + +_Implementation_: github.com/Masterminds/sprig/v3.toDate + +## toDecimal +Converts a Unix octal to a `int64`.`"0777" | toDecimal` will convert `0777` to `511` and return the value as `int64`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.toDecimal + +## toJson + + +_Aliases_: to_json + +_Implementation_: github.com/Masterminds/sprig/v3.toJson + +## toPrettyJson + + + + +_Implementation_: github.com/Masterminds/sprig/v3.toPrettyJson + +## toRawJson +Encodes an item into JSON string with HTML characters unescaped. `toRawJson .Item` will return unescaped JSON string representation of `.Item`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.toRawJson + +## toString +Converts to a string. + + + +_Implementation_: github.com/Masterminds/sprig/v3.strval + +## toStrings +Converts a list, slice or array to a list of strings. `list 1 2 3 | toString` converts `1`, `2` and `3` to strings and then returns them as a list. + + + +_Implementation_: github.com/Masterminds/sprig/v3.strslice + +## trim +Removes space from either side of a string. `trim " hello "` will return `hello`. + + + +_Implementation_: strings.TrimSpace + +## trimAll +Removes given characters from the front or back of a string. `trimAll "$" "$5.00"` will return `5.00` (as a string). + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func4 + +## trimPrefix +Trims just the prefix from a string. `trimPrefix "-" "-hello"` will return `hello`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func6 + +## trimSuffix +Trims just the suffix from a string. `trimSuffix "-" "hello-"` will return `hello`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func5 + +## trimall + + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func3 + +## trunc + + + + +_Implementation_: github.com/Masterminds/sprig/v3.trunc + +## tuple + + + + +_Implementation_: github.com/Masterminds/sprig/v3.list + +## typeIs + + + + +_Implementation_: github.com/Masterminds/sprig/v3.typeIs + +## typeIsLike + + + + +_Implementation_: github.com/Masterminds/sprig/v3.typeIsLike + +## typeOf + + + + +_Implementation_: github.com/Masterminds/sprig/v3.typeOf + +## uniq +Generates a list with all of the duplicates removed. + + + +_Implementation_: github.com/Masterminds/sprig/v3.uniq + +## unixEpoch +Returns the seconds since the Unix epoch. + + + +_Implementation_: github.com/Masterminds/sprig/v3.unixEpoch + +## unset +Given a map and a key it deletes the key from the map. It returns dictionary. Note that if the key is not found this operation will simply return. No error will be generated. + + + +_Implementation_: github.com/Masterminds/sprig/v3.unset + +## until +Builds a range of integers. `until 5` will return a list `[0, 1, 2, 3, 4]`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.until + +## untilStep +Like `until` generates a list of counting integers but it allows to define a start, stop and step. `untilStep 3 6 2` will return `[3, 5]` by starting with 3 and adding 2 until it is equal or greater than 6. + + + +_Implementation_: github.com/Masterminds/sprig/v3.untilStep + +## untitle +Removes title casing. `untitle "Hello World"` will return `"hello world"`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.untitle + +## upper +Converts the entire string to uppercase. `upper "hello"` will return `HELLO`. + + + +_Implementation_: strings.ToUpper + +## urlJoin +Joins map produced by `urlParse` to produce URL string. `urlJoin (dict "fragment" "fragment" "host" "host:80" "path" "/path" "query" "query" "scheme" "http")` will return `proto://host:80/path?query#fragment`. + + + +_Implementation_: github.com/Masterminds/sprig/v3.urlJoin + +## urlParse +Parses string for URL and produces dict with URL parts. For more info check https://golang.org/pkg/net/url/#URL. + + + +_Implementation_: github.com/Masterminds/sprig/v3.urlParse + +## values + + + + +_Implementation_: github.com/Masterminds/sprig/v3.values + +## without +Filters items out of a list. It can take more than one filter. + + + +_Implementation_: github.com/Masterminds/sprig/v3.without + +## wrap +Wraps text at a given column count. `wrap 80 $text` will wrap the string in `$text` at 80 columns. + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func7 + +## wrapWith +Works as `wrap` but lets you specify the string to wrap with (`wrap` uses `\n`). `wrapWith 5 "\t" "Hello world"` will return `hello world` (where the whitespace is an ASCII tab character). + + + +_Implementation_: github.com/Masterminds/sprig/v3.init.func8 From 89f5df70c33dc9bc5c9c1d1b689447989b238b7c Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Tue, 24 Sep 2024 09:20:10 +0200 Subject: [PATCH 4/7] add menu entry --- src/NavData.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/NavData.tsx b/src/NavData.tsx index cfe8d9cf..e8559bcb 100644 --- a/src/NavData.tsx +++ b/src/NavData.tsx @@ -215,6 +215,12 @@ const rootNavData: NavMenu = deepFreeze([ { href: '/deployments/templating', title: 'Service Templating', + sections: [ + { + href: '/deployments/templating-filters', + title: 'Supported Liquid Filters', + } + ] }, { href: '/deployments/notifications', From 85d21bf36688e89602faa9ef7b1361756ba2518a Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Tue, 24 Sep 2024 09:30:06 +0200 Subject: [PATCH 5/7] update old doc --- pages/deployments/templating.md | 13 +---------- src/generated/graphql.ts | 15 ++++++++++++- src/generated/pages.json | 39 +++++++++++++++------------------ 3 files changed, 33 insertions(+), 34 deletions(-) diff --git a/pages/deployments/templating.md b/pages/deployments/templating.md index 72f1baf1..d9b2b778 100644 --- a/pages/deployments/templating.md +++ b/pages/deployments/templating.md @@ -43,18 +43,7 @@ stringData: ## Available Functions -Our code is open source, so you can reference the code to find the deinitive function list we support is defined here: https://github.com/pluralsh/polly/blob/main/template/liquid.go#L35 - -That said there are a few good to know functions: - -* `b64enc` - encodes a string as base64 -* `b64dec` - decodes a string from base64 -* `to_json` - converts a map to json -* `from_json` - parses a json map -* `default` - uses a default value if the first argument is falsy, used like `{{ configuration.cluster.metadata.role_arn | default: "dummy-arn" }}` -* `ternary` - returns one of two values depending on whether a condition is truthy - -Additionally, we support virtually all the functions in the Sprig library used by helm. See the full documentation [here](https://masterminds.github.io/sprig/). +You can find the list of all Liquid filter functions that we support [here](/deployments/templating-filters). ## End-to-End Example diff --git a/src/generated/graphql.ts b/src/generated/graphql.ts index 43e155f6..c94cf853 100644 --- a/src/generated/graphql.ts +++ b/src/generated/graphql.ts @@ -577,6 +577,8 @@ export type ConsoleInstance = { status: ConsoleInstanceStatus; /** the subdomain this instance lives under */ subdomain: Scalars['String']['output']; + /** whether this is a shared or dedicated console */ + type: ConsoleInstanceType; updatedAt?: Maybe; /** full console url of this instance */ url: Scalars['String']['output']; @@ -591,6 +593,8 @@ export type ConsoleInstanceAttributes = { region: Scalars['String']['input']; /** a heuristic size of this instance */ size: ConsoleSize; + /** the type of console instance */ + type: ConsoleInstanceType; }; export type ConsoleInstanceConnection = { @@ -611,7 +615,14 @@ export enum ConsoleInstanceStatus { DeploymentCreated = 'DEPLOYMENT_CREATED', DeploymentDeleted = 'DEPLOYMENT_DELETED', Pending = 'PENDING', - Provisioned = 'PROVISIONED' + Provisioned = 'PROVISIONED', + StackCreated = 'STACK_CREATED', + StackDeleted = 'STACK_DELETED' +} + +export enum ConsoleInstanceType { + Dedicated = 'DEDICATED', + Shared = 'SHARED' } export type ConsoleInstanceUpdateAttributes = { @@ -3390,6 +3401,7 @@ export type RootMutationTypeLinkPublisherArgs = { export type RootMutationTypeLoginArgs = { + captcha?: InputMaybe; deviceToken?: InputMaybe; email: Scalars['String']['input']; password: Scalars['String']['input']; @@ -4965,6 +4977,7 @@ export type User = { id: Scalars['ID']['output']; impersonationPolicy?: Maybe; insertedAt?: Maybe; + intercomId?: Maybe; invites?: Maybe>>; jwt?: Maybe; loginMethod?: Maybe; diff --git a/src/generated/pages.json b/src/generated/pages.json index d55e6c5b..9d28815a 100644 --- a/src/generated/pages.json +++ b/src/generated/pages.json @@ -200,6 +200,9 @@ { "path": "/deployments/pr/pipelines" }, + { + "path": "/deployments/pr/testing" + }, { "path": "/deployments/pr-automation" }, @@ -221,6 +224,9 @@ { "path": "/deployments/stacks" }, + { + "path": "/deployments/templating-filters" + }, { "path": "/deployments/templating" }, @@ -288,34 +294,22 @@ "path": "/getting-started/video-cli-quickstart" }, { - "path": "/how-to" - }, - { - "path": "/how-to/set-up/controllers" - }, - { - "path": "/how-to/set-up" - }, - { - "path": "/how-to/set-up/mgmt-cluster" - }, - { - "path": "/how-to/set-up/micro-service" + "path": "/how-to/deploy/microservice" }, { - "path": "/how-to/set-up/pipelines" + "path": "/how-to/deploy/pipelines" }, { - "path": "/how-to/set-up/plural-cli" + "path": "/how-to/deploy/pr-automation" }, { - "path": "/how-to/set-up/plural-cli" + "path": "/how-to" }, { - "path": "/how-to/set-up/plural-console" + "path": "/how-to/set-up/controllers" }, { - "path": "/how-to/set-up/pr-automation" + "path": "/how-to/set-up/mgmt-cluster" }, { "path": "/how-to/set-up/scm-connection" @@ -398,9 +392,6 @@ { "path": "/operations/network-configuration" }, - { - "path": "/operations/pricing-calculator" - }, { "path": "/operations/security" }, @@ -446,6 +437,12 @@ { "path": "/reference/troubleshooting" }, + { + "path": "/stacks/auto-cancellation" + }, + { + "path": "/stacks/custom-stacks" + }, { "path": "/stacks/customize-runners" }, From 65c8dcb0dd77c9d514d6b267ed376d07c9875c7e Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Tue, 24 Sep 2024 09:32:52 +0200 Subject: [PATCH 6/7] format --- pages/index.tsx | 5 +++-- src/NavData.tsx | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pages/index.tsx b/pages/index.tsx index 1dced610..7f72ec02 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -202,7 +202,7 @@ function Index() { icon={} href="/how-to/set-up/mgmt-cluster" > - A guide to setting up a cluster quickly + A guide to setting up a cluster quickly } href="/how-to" > - A guided walkthrough of the majority of Plural's Fleet Management capabilties. + A guided walkthrough of the majority of Plural's Fleet Management + capabilties. Date: Tue, 24 Sep 2024 15:48:40 +0200 Subject: [PATCH 7/7] pull docs --- pages/deployments/templating-filters.md | 2420 ++++++++++++++++++----- 1 file changed, 1921 insertions(+), 499 deletions(-) diff --git a/pages/deployments/templating-filters.md b/pages/deployments/templating-filters.md index e4cf3709..f3d154b2 100644 --- a/pages/deployments/templating-filters.md +++ b/pages/deployments/templating-filters.md @@ -1,1457 +1,2879 @@ # Supported Liquid Filters -## abbrev +## `abbrev` +Truncates a string with ellipses. +_Parameters_: +- Max length -_Implementation_: github.com/Masterminds/sprig/v3.abbrev +- String to truncate -## abbrevboth +_Example_: `abbrev 5 "hello world"` returns `he...`. -_Implementation_: github.com/Masterminds/sprig/v3.abbrevboth -## add -Sums numbers. Accepts two or more inputs. `add 1 2 3` will return `6`. +_Implementation_: `github.com/Masterminds/sprig/v3.abbrev` +## `abbrevboth` +Truncates both sides of a string with ellipses. -_Implementation_: github.com/Masterminds/sprig/v3.init.func15 -## add1 -Increments by 1. `add1 3` will return `4`. +_Parameters_: +- Left offset +- Max length -_Implementation_: github.com/Masterminds/sprig/v3.init.func14 +- String to truncate -## add1f + + + +_Example_: `abbrevboth 5 10 "1234 5678 9123"` returns `...5678...`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.abbrevboth` + +## `add` +Sums numbers. Accepts two or more inputs. + + +_Parameters_: + +- Number to add + +- Number to add + +- ... + + + + +_Example_: `add 1 2 3` returns `6`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.init.func15` + +## `add1` +Increments by 1. + + +_Parameters_: + +- Number to increment + + + + +_Example_: `add1 3` returns `4`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.init.func14` + +## `add1f` Increments float number by 1. +_Parameters_: + +- Float number to increment -_Implementation_: github.com/Masterminds/sprig/v3.init.func21 -## addf -Sums float numbers. +_Example_: `add1 3.0` returns `4.0`. -_Implementation_: github.com/Masterminds/sprig/v3.init.func22 -## adler32sum -Receives a string and computes its Adler-32 checksum. +_Implementation_: `github.com/Masterminds/sprig/v3.init.func21` +## `addf` +Sums float numbers. Accepts two or more inputs. -_Implementation_: github.com/Masterminds/sprig/v3.adler32sum -## ago -Returns duration from current time in seconds resolution. +_Parameters_: +- Float number +- Float number -_Implementation_: github.com/Masterminds/sprig/v3.dateAgo +- ... -## all + + + +_Example_: `add 1.1 2.2 3.3` returns `6.6`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.init.func22` + +## `adler32sum` +Computes Adler-32 checksum of a string. + + +_Parameters_: + +- String + + + + +_Example_: `adler32sum "Hello world!"`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.adler32sum` + +## `ago` +Returns duration from current time (`time.Now`) in seconds resolution. + + +_Parameters_: + +- Date + + + + +_Example_: `ago .CreatedAt` will return something like `2h34m7s`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.dateAgo` + +## `all` Takes a list of values ad returns true if all values are non-empty. +_Parameters_: + +- List + + -_Implementation_: github.com/Masterminds/sprig/v3.all -## any + + +_Implementation_: `github.com/Masterminds/sprig/v3.all` + +## `any` Takes a list of values ad returns true if any values are non-empty. +_Parameters_: + +- List + + + + -_Implementation_: github.com/Masterminds/sprig/v3.any -## append +_Implementation_: `github.com/Masterminds/sprig/v3.any` + +## `append` Appends a new item to existing list, creating a new list. +_Parameters_: + +- List + +- Item to append + + + + +_Example_: `append ( list 1 2 3 ) 5` returns `[1, 2, 3, 5]`. + -_Implementation_: github.com/Masterminds/sprig/v3.push -## atoi +_Implementation_: `github.com/Masterminds/sprig/v3.push` + +## `atoi` Converts a string to an integer. +_Parameters_: + +- String to convert + + -_Implementation_: github.com/Masterminds/sprig/v3.init.func12 -## b32dec + + +_Implementation_: `github.com/Masterminds/sprig/v3.init.func12` + +## `b32dec` Decodes string from Base32 format. +_Parameters_: + +- String to decode -_Implementation_: github.com/Masterminds/sprig/v3.base32decode -## b32enc + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.base32decode` + +## `b32enc` Encodes string with Base32 format. +_Parameters_: + +- String to encode + + -_Implementation_: github.com/Masterminds/sprig/v3.base32encode -## b64dec + + +_Implementation_: `github.com/Masterminds/sprig/v3.base32encode` + +## `b64dec` Decodes string from Base64 format. +_Parameters_: + +- String to decode + + + + -_Implementation_: github.com/Masterminds/sprig/v3.base64decode -## b64enc +_Implementation_: `github.com/Masterminds/sprig/v3.base64decode` + +## `b64enc` Encodes string with Base64 format. +_Parameters_: + +- String to encode + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.base64encode` + +## `base` +Returns the last element of a path. + + +_Parameters_: + +- Path + + + + +_Example_: `base "foo/bar/baz"` returns `baz`. + + + +_Implementation_: `path.Base` + +## `bcrypt` +Generates bcrypt hash of a string. + + +_Parameters_: + +- String + -_Implementation_: github.com/Masterminds/sprig/v3.base64encode -## base +_Implementation_: `github.com/Masterminds/sprig/v3.bcrypt` -_Implementation_: path.Base +## `biggest` -## bcrypt -Receives a string and generates its bcrypt hash. -_Implementation_: github.com/Masterminds/sprig/v3.bcrypt -## biggest +_Implementation_: `github.com/Masterminds/sprig/v3.max` +## `buildCustomCert` +Allows customizing the certificate. It returns object with PEM-encoded certificate and key. Note that the returned object can be passed to the `genSignedCert` function to sign a certificate using this CA. -_Implementation_: github.com/Masterminds/sprig/v3.max -## buildCustomCert -Allows customizing the certificate. It takes Base64 encoded PEM format certificate and private key as arguments and returns object with PEM-encoded certificate and key. Note that the returned object can be passed to the `genSignedCert` function to sign a certificate using this CA. +_Parameters_: +- Base64 encoded PEM format certificate +- Base64 encoded PEM format private key -_Implementation_: github.com/Masterminds/sprig/v3.buildCustomCertificate -## camelcase +_Example_: `$ca := buildCustomCert "base64-encoded-ca-crt" "base64-encoded-ca-key"` -_Implementation_: github.com/huandu/xstrings.ToPascalCase -## cat +_Implementation_: `github.com/Masterminds/sprig/v3.buildCustomCertificate` +## `camelcase` +Converts a string from snake_case to camelCase. +_Parameters_: -_Implementation_: github.com/Masterminds/sprig/v3.cat +- String to convert -## ceil -Returns greatest float value greater than or equal to input value. `ceil 123.001` will return `124.0`. -_Implementation_: github.com/Masterminds/sprig/v3.ceil +_Example_: `camelcase "http_server"` returns `HttpServer`. -## chunk +_Implementation_: `github.com/huandu/xstrings.ToPascalCase` +## `cat` -_Implementation_: github.com/Masterminds/sprig/v3.chunk -## clean -_Implementation_: path.Clean -## coalesce +_Implementation_: `github.com/Masterminds/sprig/v3.cat` +## `ceil` +Returns greatest float value greater than or equal to input value. +_Parameters_: -_Implementation_: github.com/Masterminds/sprig/v3.coalesce +- Input value -## compact + + + +_Example_: `ceil 123.001` will return `124.0`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.ceil` + +## `chunk` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.chunk` + +## `clean` + + + + + + + +_Implementation_: `path.Clean` + +## `coalesce` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.coalesce` + +## `compact` Accepts a list and removes entries with empty values. +_Parameters_: + +- List -_Implementation_: github.com/Masterminds/sprig/v3.compact -## concat + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.compact` + +## `concat` Concatenates arbitrary number of lists into one. +_Parameters_: + +- List + +- ... + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.concat` + +## `contains` +Tests if one string is contained inside of another. + + +_Parameters_: -_Implementation_: github.com/Masterminds/sprig/v3.concat +- Substring -## contains -Tests if one string is contained inside of another. `contains "cat" "catch"` will return `true`. +- String -_Implementation_: github.com/Masterminds/sprig/v3.init.func9 -## date -Formats date. +_Example_: `contains "cat" "catch"` returns `true`. -_Implementation_: github.com/Masterminds/sprig/v3.date +_Implementation_: `github.com/Masterminds/sprig/v3.init.func9` -## dateInZone +## `date` +Formats date. See https://pauladamsmith.com/blog/2011/05/go_time.html. + + +_Parameters_: + +- Date layout + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.date` + +## `dateInZone` Same as `date` but with a timezone. +_Parameters_: + +- Date layout + +- Date to format -_Implementation_: github.com/Masterminds/sprig/v3.dateInZone +- Timezone -## dateModify +_Example_: `dateInZone "2006-01-02" (now) "UTC"`. -_Implementation_: github.com/Masterminds/sprig/v3.dateModify -## date_in_zone +_Aliases_: `date_in_zone`\ +_Implementation_: `github.com/Masterminds/sprig/v3.dateInZone` +## `dateModify` +Allows date modifications. +_Parameters_: -_Implementation_: github.com/Masterminds/sprig/v3.dateInZone +- Date modification -## date_modify +- Date -_Implementation_: github.com/Masterminds/sprig/v3.dateModify +_Example_: `now | dateModify "-1.5h"` will subtract an hour and thirty minutes from the current time. -## decryptAES + +_Aliases_: `date_modify`\ +_Implementation_: `github.com/Masterminds/sprig/v3.dateModify` + +## `decryptAES` Receives a Base64 string encoded by the AES-256 CBC algorithm and returns the decoded text. +_Parameters_: + +- Base64 string encoded by the AES-256 CBC algorithm + -_Implementation_: github.com/Masterminds/sprig/v3.decryptAES -## deepCopy +_Implementation_: `github.com/Masterminds/sprig/v3.decryptAES` -_Implementation_: github.com/Masterminds/sprig/v3.deepCopy +## `deepCopy` +Makes deep copy of the value. This includes maps and other structures. It will panic if there is a problem. -## deepEqual +_Parameters_: +- Value to copy -_Implementation_: reflect.DeepEqual -## default +_Example_: `dict "a" 1 "b" 2 | deepCopy`. -_Implementation_: github.com/pluralsh/polly/template.dfault +_Implementation_: `github.com/Masterminds/sprig/v3.deepCopy` -## derivePassword +## `deepEqual` -_Implementation_: github.com/Masterminds/sprig/v3.derivePassword -## dict +_Implementation_: `reflect.DeepEqual` +## `default` -_Implementation_: github.com/Masterminds/sprig/v3.dict -## dig -_Implementation_: github.com/Masterminds/sprig/v3.dig -## dir +_Implementation_: `github.com/pluralsh/polly/template.dfault` +## `derivePassword` -_Implementation_: path.Dir -## div + + + +_Implementation_: `github.com/Masterminds/sprig/v3.derivePassword` + +## `dict` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.dict` + +## `dig` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.dig` + +## `dir` + + + + + + + +_Implementation_: `path.Dir` + +## `div` Performs integer division. -_Implementation_: github.com/Masterminds/sprig/v3.init.func17 -## divf +_Implementation_: `github.com/Masterminds/sprig/v3.init.func17` +## `divf` +Performs float number division. -_Implementation_: github.com/Masterminds/sprig/v3.init.func24 -## duration -Formats a given amount of seconds as a `time.Duration`. -_Implementation_: github.com/Masterminds/sprig/v3.duration -## durationRound +_Implementation_: `github.com/Masterminds/sprig/v3.init.func24` +## `duration` +Formats a given amount of seconds as a `time.Duration`. +_Parameters_: -_Implementation_: github.com/Masterminds/sprig/v3.durationRound +- Amount of seconds -## empty +_Example_: `duration "95"` returns `1m35s`. -_Implementation_: github.com/Masterminds/sprig/v3.empty -## encryptAES -Encrypts text with AES-256 CBC and returns a Base64 encoded string. +_Implementation_: `github.com/Masterminds/sprig/v3.duration` +## `durationRound` -_Implementation_: github.com/Masterminds/sprig/v3.encryptAES -## env -Reads environment variable. -_Implementation_: os.Getenv -## expandenv -Substitutes environment variable in a string. +_Implementation_: `github.com/Masterminds/sprig/v3.durationRound` +## `empty` +Returns true if given value has the zero value for its type. -_Implementation_: os.ExpandEnv -## ext -Returns file extension. `ext "foo.bar"` will return `"bar"`. +_Parameters_: +- Value -_Implementation_: path.Ext -## fail -Unconditionally returns an empty string and an error with the specified text. This is useful in scenarios where other conditionals have determined that template rendering should fail. +_Example_: `empty .Foo`. -_Implementation_: github.com/Masterminds/sprig/v3.init.func26 -## first -Returns head item on a list. +_Implementation_: `github.com/Masterminds/sprig/v3.empty` +## `encryptAES` +Encrypts text with AES-256 CBC and returns a Base64 encoded string. -_Implementation_: github.com/Masterminds/sprig/v3.first +_Parameters_: -## float64 -Converts to a `float64`. +- Secret key +- Text to encrypt -_Implementation_: github.com/Masterminds/sprig/v3.toFloat64 -## floor -Returns the greatest float value greater than or equal to input value. `floor 123.9999` will return `123.0`. +_Example_: `encryptAES "secretkey" "plaintext"`. -_Implementation_: github.com/Masterminds/sprig/v3.floor -## fromJson +_Implementation_: `github.com/Masterminds/sprig/v3.encryptAES` +## `env` +Reads environment variable. -_Aliases_: from_json -_Implementation_: github.com/Masterminds/sprig/v3.fromJson +_Parameters_: -## genCA -Generates a new, self-signed x509 SSL Certificate Authority using 2048-bit RSA private key. It takes subject common name (CN) and cert validity duration in days as parameters. It returns object with PEM-encoded certificate and key. Note that the returned object can be passed to the `genSignedCert` function to sign a certificate using this CA. +- Environment variable name -_Implementation_: github.com/Masterminds/sprig/v3.generateCertificateAuthority -## genCAWithKey -Generates a new, self-signed x509 SSL Certificate Authority using given private key. It takes subject common name (CN), cert validity duration in days and private key (PEM-encoded; DSA keys are not supported) as parameters. It returns object with PEM-encoded certificate and key. Note that the returned object can be passed to the `genSignedCert` function to sign a certificate using this CA. +_Example_: `env "HOME"` -_Implementation_: github.com/Masterminds/sprig/v3.generateCertificateAuthorityWithPEMKey +_Implementation_: `os.Getenv` -## genPrivateKey +## `expandenv` +Substitutes environment variable in a string. +_Parameters_: +- String to expand -_Implementation_: github.com/Masterminds/sprig/v3.generatePrivateKey -## genSelfSignedCert -Generates an SSL self-signed certificate. +_Example_: `expandenv "Your path is set to $PATH"` -_Implementation_: github.com/Masterminds/sprig/v3.generateSelfSignedCertificate -## genSelfSignedCertWithKey +_Implementation_: `os.ExpandEnv` +## `ext` +Returns file extension. -_Implementation_: github.com/Masterminds/sprig/v3.generateSelfSignedCertificateWithPEMKey +_Parameters_: -## genSignedCert -Generates an SSL certificate and key based on a given CA. +- File path -_Implementation_: github.com/Masterminds/sprig/v3.generateSignedCertificate -## genSignedCertWithKey +_Example_: `ext "foo.bar"` will return `"bar"` +_Implementation_: `path.Ext` -_Implementation_: github.com/Masterminds/sprig/v3.generateSignedCertificateWithPEMKey +## `fail` +Unconditionally returns an empty string and an error with the specified text. This is useful in scenarios where other conditionals have determined that template rendering should fail. -## get +_Parameters_: +- Error message -_Implementation_: github.com/Masterminds/sprig/v3.get -## getHostByName +_Example_: `fail "Please accept the end user license agreement"` -_Implementation_: github.com/Masterminds/sprig/v3.getHostByName +_Implementation_: `github.com/Masterminds/sprig/v3.init.func26` -## has -Checks if a list has a particular element. +## `first` +Returns head item on a list. +_Parameters_: -_Implementation_: github.com/Masterminds/sprig/v3.has +- List -## hasKey -_Implementation_: github.com/Masterminds/sprig/v3.hasKey -## hasPrefix +_Implementation_: `github.com/Masterminds/sprig/v3.first` +## `float64` +Converts to a `float64` +_Parameters_: -_Implementation_: github.com/Masterminds/sprig/v3.init.func10 +- Value to convert, it can be for example an integer or a string -## hasSuffix -_Implementation_: github.com/Masterminds/sprig/v3.init.func11 -## htmlDate -Formats a date for inserting into HTML date picker input field. +_Implementation_: `github.com/Masterminds/sprig/v3.toFloat64` +## `floor` +Returns the greatest float value greater than or equal to input value. -_Implementation_: github.com/Masterminds/sprig/v3.htmlDate +_Parameters_: -## htmlDateInZone -Same as `htmlDate` but with a timezone. +- Input value -_Implementation_: github.com/Masterminds/sprig/v3.htmlDateInZone -## htpasswd +_Example_: `floor 123.9999` will return `123.0` +_Implementation_: `github.com/Masterminds/sprig/v3.floor` -_Implementation_: github.com/Masterminds/sprig/v3.htpasswd +## `fromJson` +Decodes a JSON document into a structure. If the input cannot be decoded as JSON the function will return an empty string. -## indent +_Parameters_: +- JSON document -_Implementation_: github.com/pluralsh/polly/template.indent -## initial -Compliments `last` by retuning all but the last element. +_Example_: `fromJson "{\"foo\": 55}"`. -_Implementation_: github.com/Masterminds/sprig/v3.initial +_Aliases_: `from_json`\ +_Implementation_: `github.com/Masterminds/sprig/v3.fromJson` -## initials +## `genCA` +Generates a new, self-signed x509 SSL Certificate Authority using 2048-bit RSA private key. It returns object with PEM-encoded certificate and key. Note that the returned object can be passed to the `genSignedCert` function to sign a certificate using this CA. +_Parameters_: +- Subject common name (CN) -_Implementation_: github.com/Masterminds/sprig/v3.initials +- Cert validity duration in days -## int -Converts to a `int`. -_Implementation_: github.com/Masterminds/sprig/v3.toInt -## int64 -Converts to a `int64`. +_Implementation_: `github.com/Masterminds/sprig/v3.generateCertificateAuthority` +## `genCAWithKey` +Generates a new, self-signed x509 SSL Certificate Authority using given private key. It returns object with PEM-encoded certificate and key. Note that the returned object can be passed to the `genSignedCert` function to sign a certificate using this CA. -_Implementation_: github.com/Masterminds/sprig/v3.toInt64 -## isAbs -Checks whether a path is absolute. +_Parameters_: + +- Subject common name (CN) +- Cert validity duration in days +- private key (PEM-encoded; DSA keys are not supported) -_Implementation_: path.IsAbs -## join -_Implementation_: github.com/Masterminds/sprig/v3.join +_Implementation_: `github.com/Masterminds/sprig/v3.generateCertificateAuthorityWithPEMKey` -## kebabcase +## `genPrivateKey` +Generates a new private key encoded into a PEM block. +_Parameters_: +- Key type (ecdsa, dsa, rsa or ed25519) -_Implementation_: github.com/huandu/xstrings.ToKebabCase -## keys -_Implementation_: github.com/Masterminds/sprig/v3.keys +_Implementation_: `github.com/Masterminds/sprig/v3.generatePrivateKey` -## kindIs +## `genSelfSignedCert` +Generates an SSL self-signed certificate. -_Implementation_: github.com/Masterminds/sprig/v3.kindIs -## kindOf +_Implementation_: `github.com/Masterminds/sprig/v3.generateSelfSignedCertificate` +## `genSelfSignedCertWithKey` -_Implementation_: github.com/Masterminds/sprig/v3.kindOf -## last -_Implementation_: github.com/Masterminds/sprig/v3.last +_Implementation_: `github.com/Masterminds/sprig/v3.generateSelfSignedCertificateWithPEMKey` -## list +## `genSignedCert` +Generates an SSL certificate and key based on a given CA. -_Implementation_: github.com/Masterminds/sprig/v3.list -## lower -Converts the entire string to lowercase. `upper "HELLO"` will return `hello`. +_Implementation_: `github.com/Masterminds/sprig/v3.generateSignedCertificate` +## `genSignedCertWithKey` -_Implementation_: strings.ToLower -## max -Returns the largest of a series of integers. `max 1 2 3` will return `3`. -_Implementation_: github.com/Masterminds/sprig/v3.max -## maxf +_Implementation_: `github.com/Masterminds/sprig/v3.generateSignedCertificateWithPEMKey` +## `get` -_Implementation_: github.com/Masterminds/sprig/v3.maxf -## merge -_Implementation_: github.com/Masterminds/sprig/v3.merge +_Implementation_: `github.com/Masterminds/sprig/v3.get` -## mergeOverwrite +## `getHostByName` -_Implementation_: github.com/Masterminds/sprig/v3.mergeOverwrite -## min -Returns the smallest of a series of integers. `min 1 2 3` will return `1`. +_Implementation_: `github.com/Masterminds/sprig/v3.getHostByName` -_Implementation_: github.com/Masterminds/sprig/v3.min +## `has` +Checks if a list has a particular element. It will panic if there is a problem. -## minf +_Parameters_: +- Element to find +- List -_Implementation_: github.com/Masterminds/sprig/v3.minf -## mod +_Example_: `has 4 $myList` -_Implementation_: github.com/Masterminds/sprig/v3.init.func18 -## mul -Multiples numbers. Accepts two or more inputs. `mul 1 2 3` will return `6`. +_Implementation_: `github.com/Masterminds/sprig/v3.has` +## `hasKey` +Checks if given dictionary contains given key. -_Implementation_: github.com/Masterminds/sprig/v3.init.func19 +_Parameters_: -## mulf +- Map +- Key to find -_Implementation_: github.com/Masterminds/sprig/v3.init.func25 -## mustAppend -Appends a new item to existing list, creating a new list. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. +_Implementation_: `github.com/Masterminds/sprig/v3.hasKey` -_Implementation_: github.com/Masterminds/sprig/v3.mustPush +## `hasPrefix` +Check if string has given prefix. -## mustChunk +_Parameters_: +- Prefix +- String -_Implementation_: github.com/Masterminds/sprig/v3.mustChunk -## mustCompact -Accepts a list and removes entries with empty values. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. -_Implementation_: github.com/Masterminds/sprig/v3.mustCompact -## mustDateModify +_Implementation_: `github.com/Masterminds/sprig/v3.init.func10` +## `hasSuffix` +Check if string has given suffix. +_Parameters_: -_Implementation_: github.com/Masterminds/sprig/v3.mustDateModify +- Prefix -## mustDeepCopy +- Suffix -_Implementation_: github.com/Masterminds/sprig/v3.mustDeepCopy -## mustFirst -Returns head item on a list. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. +_Implementation_: `github.com/Masterminds/sprig/v3.init.func11` +## `htmlDate` +Formats a date for inserting into HTML date picker input field. -_Implementation_: github.com/Masterminds/sprig/v3.mustFirst -## mustFromJson +_Parameters_: +- Date -_Implementation_: github.com/Masterminds/sprig/v3.mustFromJson -## mustHas -Checks if a list has a particular element. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. +_Example_: `now | htmlDate`. -_Implementation_: github.com/Masterminds/sprig/v3.mustHas +_Implementation_: `github.com/Masterminds/sprig/v3.htmlDate` -## mustInitial -Compliments `last` by retuning all but the last element. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. +## `htmlDateInZone` +Same as `htmlDate` but with a timezone. +_Parameters_: -_Implementation_: github.com/Masterminds/sprig/v3.mustInitial +- Date -## mustLast +- Timezone -_Implementation_: github.com/Masterminds/sprig/v3.mustLast +_Example_: `htmlDateInZone (now) "UTC"`. -## mustMerge +_Implementation_: `github.com/Masterminds/sprig/v3.htmlDateInZone` +## `htpasswd` -_Implementation_: github.com/Masterminds/sprig/v3.mustMerge -## mustMergeOverwrite -_Implementation_: github.com/Masterminds/sprig/v3.mustMergeOverwrite -## mustPrepend +_Implementation_: `github.com/Masterminds/sprig/v3.htpasswd` +## `indent` -_Implementation_: github.com/Masterminds/sprig/v3.mustPrepend -## mustPush +_Implementation_: `github.com/pluralsh/polly/template.indent` -_Implementation_: github.com/Masterminds/sprig/v3.mustPush +## `initial` +Compliments `last` by retuning all but the last element. It will panic if there is a problem. -## mustRegexFind +_Parameters_: +- List -_Implementation_: github.com/Masterminds/sprig/v3.mustRegexFind -## mustRegexFindAll +_Implementation_: `github.com/Masterminds/sprig/v3.initial` -_Implementation_: github.com/Masterminds/sprig/v3.mustRegexFindAll +## `initials` -## mustRegexMatch -_Implementation_: github.com/Masterminds/sprig/v3.mustRegexMatch -## mustRegexReplaceAll +_Implementation_: `github.com/Masterminds/sprig/v3.initials` +## `int` +Converts to a `int`. -_Implementation_: github.com/Masterminds/sprig/v3.mustRegexReplaceAll +_Parameters_: -## mustRegexReplaceAllLiteral +- Value to convert -_Implementation_: github.com/Masterminds/sprig/v3.mustRegexReplaceAllLiteral -## mustRegexSplit +_Implementation_: `github.com/Masterminds/sprig/v3.toInt` +## `int64` +Converts to a `int64`. -_Implementation_: github.com/Masterminds/sprig/v3.mustRegexSplit +_Parameters_: -## mustRest -Gets tail of the list (everything but the first item). Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. +- Value to convert -_Implementation_: github.com/Masterminds/sprig/v3.mustRest -## mustReverse -Produces a new list with the reversed elements of the given list. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. +_Implementation_: `github.com/Masterminds/sprig/v3.toInt64` -_Implementation_: github.com/Masterminds/sprig/v3.mustReverse +## `isAbs` +Checks whether a path is absolute. -## mustSlice +_Parameters_: +- File path -_Implementation_: github.com/Masterminds/sprig/v3.mustSlice -## mustToDate -Converts a string to a date. The first argument is the date layout and the second is the date string. If the string can’t be converted it returns the zero value. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. -_Implementation_: github.com/Masterminds/sprig/v3.mustToDate +_Implementation_: `path.IsAbs` -## mustToJson +## `join` -_Implementation_: github.com/Masterminds/sprig/v3.mustToJson -## mustToPrettyJson +_Implementation_: `github.com/Masterminds/sprig/v3.join` +## `kebabcase` +Converts a string from camelCase to kebab-case. -_Implementation_: github.com/Masterminds/sprig/v3.mustToPrettyJson -## mustToRawJson +_Parameters_: +- String to convert -_Implementation_: github.com/Masterminds/sprig/v3.mustToRawJson -## mustUniq -Generates a list with all of the duplicates removed. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. +_Example_: `kebabcase "FirstName"` returns `first-name`. -_Implementation_: github.com/Masterminds/sprig/v3.mustUniq +_Implementation_: `github.com/huandu/xstrings.ToKebabCase` -## mustWithout -Filters items out of a list. Like other `must` functions instead of panicking when there is a problem it will return an error to the template engine. +## `keys` +Returns list of all keys from a map. +_Parameters_: -_Implementation_: github.com/Masterminds/sprig/v3.mustWithout +- Map -## must_date_modify -_Implementation_: github.com/Masterminds/sprig/v3.mustDateModify -## nindent +_Implementation_: `github.com/Masterminds/sprig/v3.keys` +## `kindIs` -_Implementation_: github.com/pluralsh/polly/template.nindent -## nospace -Removes all whitespace from a string. `nospace "hello w o r l d"` will return `helloworld`. -_Implementation_: github.com/Masterminds/goutils.DeleteWhiteSpace +_Implementation_: `github.com/Masterminds/sprig/v3.kindIs` -## omit +## `kindOf` -_Implementation_: github.com/Masterminds/sprig/v3.omit -## osBase -Returns the last element of a file path. `osBase "/foo/bar/baz"` and `osBase "C:\\foo\\bar\\baz"` will return `"baz"` on Linux and Windows, respectively. +_Implementation_: `github.com/Masterminds/sprig/v3.kindOf` -_Implementation_: path/filepath.Base +## `last` -## osClean -Cleans up a path. `osClean "/foo/bar/../baz"` and `osClean "C:\\foo\\bar\\..\\baz"` will resolve the `..` and return `foo/baz` on Linux and `C:\foo\baz` on Windows. -_Implementation_: path/filepath.Clean -## osDir -Returns the directory, stripping the last part of the path. So `osDir "/foo/bar/baz"` returns `/foo/bar` on Linux, and `osDir "C:\\foo\\bar\\baz"` returns `C:\\foo\\bar` on Windows. +_Implementation_: `github.com/Masterminds/sprig/v3.last` -_Implementation_: path/filepath.Dir +## `list` -## osExt -Return the file extension. `osExt "/foo.bar"` and `osExt "C:\\foo.bar"` will return `.bar` on Linux and Windows, respectively. -_Implementation_: path/filepath.Ext -## osIsAbs -Checks whether a file path is absolute. +_Implementation_: `github.com/Masterminds/sprig/v3.list` -_Implementation_: path/filepath.IsAbs +## `lower` +Converts the entire string to lowercase. -## pick +_Parameters_: +- String to transform -_Implementation_: github.com/Masterminds/sprig/v3.pick -## pluck +_Example_: `upper \"HELLO\"` will return `hello`. -_Implementation_: github.com/Masterminds/sprig/v3.pluck +_Implementation_: `strings.ToLower` -## plural +## `max` +Returns the largest of a series of integers. +_Parameters_: +- Number -_Implementation_: github.com/Masterminds/sprig/v3.plural +- Number -## prepend +- ... -_Implementation_: github.com/Masterminds/sprig/v3.prepend +_Example_: `max 1 2 3` will return `3`. -## push +_Implementation_: `github.com/Masterminds/sprig/v3.max` +## `maxf` +Returns the largest of a series of floats. -_Implementation_: github.com/Masterminds/sprig/v3.push -## quote +_Parameters_: +- Float number +- Float number +- ... -_Implementation_: github.com/Masterminds/sprig/v3.quote -## randAlpha +_Example_: `max 1 2 3.65` will return `3.65`. -_Implementation_: github.com/Masterminds/sprig/v3.randAlpha -## randAlphaNum +_Implementation_: `github.com/Masterminds/sprig/v3.maxf` +## `merge` -_Implementation_: github.com/Masterminds/sprig/v3.randAlphaNumeric -## randAscii +_Implementation_: `github.com/Masterminds/sprig/v3.merge` -_Implementation_: github.com/Masterminds/sprig/v3.randAscii +## `mergeOverwrite` -## randBytes -Accepts a count `N` and generates cryptographically secure random sequence of `N` bytes. The sequence is returned as a Base64 encoded string. -_Implementation_: github.com/Masterminds/sprig/v3.randBytes -## randInt -Returns a random integer value from min (inclusive) to max (exclusive). `randInt 12 30` will produce a random number in the range from 12 to 30. +_Implementation_: `github.com/Masterminds/sprig/v3.mergeOverwrite` -_Implementation_: github.com/Masterminds/sprig/v3.init.func20 +## `min` +Returns the smallest of a series of integers. -## randNumeric +_Parameters_: +- Number +- Number -_Implementation_: github.com/Masterminds/sprig/v3.randNumeric +- ... -## regexFind +_Example_: `min 1 2 3` will return `1`. -_Implementation_: github.com/Masterminds/sprig/v3.regexFind -## regexFindAll +_Implementation_: `github.com/Masterminds/sprig/v3.min` +## `minf` +Returns the smallest of a series of floats. -_Implementation_: github.com/Masterminds/sprig/v3.regexFindAll +_Parameters_: -## regexMatch +- Float number +- Float number +- ... -_Implementation_: github.com/Masterminds/sprig/v3.regexMatch -## regexQuoteMeta +_Example_: `min 1.3 2 3` will return `1.3`. -_Implementation_: github.com/Masterminds/sprig/v3.regexQuoteMeta +_Implementation_: `github.com/Masterminds/sprig/v3.minf` -## regexReplaceAll +## `mod` -_Implementation_: github.com/Masterminds/sprig/v3.regexReplaceAll -## regexReplaceAllLiteral +_Implementation_: `github.com/Masterminds/sprig/v3.init.func18` +## `mul` +Multiplies numbers. Accepts two or more inputs. -_Implementation_: github.com/Masterminds/sprig/v3.regexReplaceAllLiteral -## regexSplit +_Parameters_: +- Number +- Number +- ... -_Implementation_: github.com/Masterminds/sprig/v3.regexSplit -## repeat +_Example_: `mul 1 2 3` will return `6`. -_Implementation_: github.com/Masterminds/sprig/v3.init.func2 -## replace +_Implementation_: `github.com/Masterminds/sprig/v3.init.func19` +## `mulf` +Multiplies float numbers. Accepts two or more inputs. +_Parameters_: -_Implementation_: strings.ReplaceAll +- Float number -## rest -Gets tail of the list (everything but the first item). +- Float number +- ... -_Implementation_: github.com/Masterminds/sprig/v3.rest -## reverse -Produces a new list with the reversed elements of the given list. +_Example_: `mulf 1.5 2 2` returns `6`. -_Implementation_: github.com/Masterminds/sprig/v3.reverse -## round -Returns a float value with the remainder rounded to the given number to digits after the decimal point. `round 123.55555 3` will return `123.556`. +_Implementation_: `github.com/Masterminds/sprig/v3.init.func25` +## `mustAppend` +Appends a new item to existing list, creating a new list. It will return an error to the template engine if there is a problem. -_Implementation_: github.com/Masterminds/sprig/v3.round +_Parameters_: -## semver +- List +- Item to append -_Implementation_: github.com/Masterminds/sprig/v3.semver -## semverCompare +_Example_: `mustAppend ( list 1 2 3 ) 5` returns `[1, 2, 3, 5]`. -_Aliases_: semver_compare -_Implementation_: github.com/Masterminds/sprig/v3.semverCompare +_Implementation_: `github.com/Masterminds/sprig/v3.mustPush` -## seq -Works like Bash `seq` command. Specify 1 parameter (`end`) to generate all counting integers between 1 and `end` inclusive. Specify 2 parameters (`start` and `end`) to generate all counting integers between `start` and `end` inclusive incrementing or decrementing by 1. Specify 3 parameters (`start`, `step` and `end`) to generate all counting integers between `start` and `end` inclusive incrementing or decrementing by `step`. +## `mustChunk` -_Implementation_: github.com/Masterminds/sprig/v3.seq -## set +_Implementation_: `github.com/Masterminds/sprig/v3.mustChunk` -_Implementation_: github.com/Masterminds/sprig/v3.set +## `mustCompact` +Accepts a list and removes entries with empty values. It will return an error to the template engine if there is a problem. -## sha1sum +_Parameters_: +- List -_Implementation_: github.com/Masterminds/sprig/v3.sha1sum -## sha256sum -_Aliases_: sha26sum -_Implementation_: github.com/Masterminds/sprig/v3.sha256sum +_Implementation_: `github.com/Masterminds/sprig/v3.mustCompact` -## sha512sum +## `mustDateModify` -_Implementation_: github.com/Masterminds/sprig/v3.sha512sum -## shuffle +_Aliases_: `must_date_modify`\ +_Implementation_: `github.com/Masterminds/sprig/v3.mustDateModify` +## `mustDeepCopy` -_Implementation_: github.com/huandu/xstrings.Shuffle -## slice -_Implementation_: github.com/Masterminds/sprig/v3.slice +_Implementation_: `github.com/Masterminds/sprig/v3.mustDeepCopy` -## snakecase +## `mustFirst` +Returns head item on a list. It will return an error to the template engine if there is a problem. +_Parameters_: +- List -_Implementation_: github.com/huandu/xstrings.ToSnakeCase -## sortAlpha +_Example_: `mustFirst $myList` -_Implementation_: github.com/Masterminds/sprig/v3.sortAlpha -## split +_Implementation_: `github.com/Masterminds/sprig/v3.mustFirst` +## `mustFromJson` -_Implementation_: github.com/Masterminds/sprig/v3.split -## splitList +_Implementation_: `github.com/Masterminds/sprig/v3.mustFromJson` -_Implementation_: github.com/Masterminds/sprig/v3.init.func13 +## `mustHas` +Checks if a list has a particular element. It will return an error to the template engine if there is a problem. -## splitn +_Parameters_: +- Element to find +- List -_Implementation_: github.com/Masterminds/sprig/v3.splitn -## squote +_Example_: `mustHas 4 $myList` -_Implementation_: github.com/Masterminds/sprig/v3.squote -## sub +_Implementation_: `github.com/Masterminds/sprig/v3.mustHas` +## `mustInitial` +Compliments `last` by retuning all but the last element. It will return an error to the template engine ifd there is a problem. +_Parameters_: -_Implementation_: github.com/Masterminds/sprig/v3.init.func16 +- List -## subf +_Example_: `mustInitial $myList` -_Implementation_: github.com/Masterminds/sprig/v3.init.func23 -## substr +_Implementation_: `github.com/Masterminds/sprig/v3.mustInitial` +## `mustLast` -_Implementation_: github.com/Masterminds/sprig/v3.substring -## swapcase -_Implementation_: github.com/Masterminds/goutils.SwapCase +_Implementation_: `github.com/Masterminds/sprig/v3.mustLast` -## ternary -Takes two values and a test value. If the test value is true, the first value will be returned. If the test value is false, the second value will be returned. This is similar to the C ternary operator. `ternary "foo" "bar" true` or `true | "foo" "bar"` will return `"foo"`. +## `mustMerge` -_Implementation_: github.com/pluralsh/polly/template.ternary -## title -Converts a string to title case. `title "hello world"` will return `"Hello World"`. -_Implementation_: strings.Title +_Implementation_: `github.com/Masterminds/sprig/v3.mustMerge` -## toDate -Converts a string to a date. The first argument is the date layout and the second is the date string. If the string can’t be converted it returns the zero value. +## `mustMergeOverwrite` -_Implementation_: github.com/Masterminds/sprig/v3.toDate -## toDecimal -Converts a Unix octal to a `int64`.`"0777" | toDecimal` will convert `0777` to `511` and return the value as `int64`. -_Implementation_: github.com/Masterminds/sprig/v3.toDecimal +_Implementation_: `github.com/Masterminds/sprig/v3.mustMergeOverwrite` -## toJson +## `mustPrepend` -_Aliases_: to_json -_Implementation_: github.com/Masterminds/sprig/v3.toJson -## toPrettyJson +_Implementation_: `github.com/Masterminds/sprig/v3.mustPrepend` -_Implementation_: github.com/Masterminds/sprig/v3.toPrettyJson +## `mustPush` -## toRawJson -Encodes an item into JSON string with HTML characters unescaped. `toRawJson .Item` will return unescaped JSON string representation of `.Item`. -_Implementation_: github.com/Masterminds/sprig/v3.toRawJson -## toString -Converts to a string. +_Implementation_: `github.com/Masterminds/sprig/v3.mustPush` -_Implementation_: github.com/Masterminds/sprig/v3.strval +## `mustRegexFind` -## toStrings -Converts a list, slice or array to a list of strings. `list 1 2 3 | toString` converts `1`, `2` and `3` to strings and then returns them as a list. -_Implementation_: github.com/Masterminds/sprig/v3.strslice -## trim -Removes space from either side of a string. `trim " hello "` will return `hello`. +_Implementation_: `github.com/Masterminds/sprig/v3.mustRegexFind` -_Implementation_: strings.TrimSpace +## `mustRegexFindAll` -## trimAll -Removes given characters from the front or back of a string. `trimAll "$" "$5.00"` will return `5.00` (as a string). -_Implementation_: github.com/Masterminds/sprig/v3.init.func4 -## trimPrefix -Trims just the prefix from a string. `trimPrefix "-" "-hello"` will return `hello`. +_Implementation_: `github.com/Masterminds/sprig/v3.mustRegexFindAll` -_Implementation_: github.com/Masterminds/sprig/v3.init.func6 +## `mustRegexMatch` -## trimSuffix -Trims just the suffix from a string. `trimSuffix "-" "hello-"` will return `hello`. -_Implementation_: github.com/Masterminds/sprig/v3.init.func5 -## trimall +_Implementation_: `github.com/Masterminds/sprig/v3.mustRegexMatch` +## `mustRegexReplaceAll` -_Implementation_: github.com/Masterminds/sprig/v3.init.func3 -## trunc -_Implementation_: github.com/Masterminds/sprig/v3.trunc -## tuple +_Implementation_: `github.com/Masterminds/sprig/v3.mustRegexReplaceAll` +## `mustRegexReplaceAllLiteral` -_Implementation_: github.com/Masterminds/sprig/v3.list -## typeIs +_Implementation_: `github.com/Masterminds/sprig/v3.mustRegexReplaceAllLiteral` -_Implementation_: github.com/Masterminds/sprig/v3.typeIs +## `mustRegexSplit` -## typeIsLike -_Implementation_: github.com/Masterminds/sprig/v3.typeIsLike -## typeOf +_Implementation_: `github.com/Masterminds/sprig/v3.mustRegexSplit` +## `mustRest` +Gets tail of the list (everything but the first item). It will return an error to the template engine if there is a problem. -_Implementation_: github.com/Masterminds/sprig/v3.typeOf +_Parameters_: -## uniq -Generates a list with all of the duplicates removed. +- List -_Implementation_: github.com/Masterminds/sprig/v3.uniq -## unixEpoch -Returns the seconds since the Unix epoch. +_Example_: `mustRest $myList` -_Implementation_: github.com/Masterminds/sprig/v3.unixEpoch +_Implementation_: `github.com/Masterminds/sprig/v3.mustRest` -## unset -Given a map and a key it deletes the key from the map. It returns dictionary. Note that if the key is not found this operation will simply return. No error will be generated. +## `mustReverse` +Produces a new list with the reversed elements of the given list. It will return an error to the template engine if there is a problem. +_Parameters_: -_Implementation_: github.com/Masterminds/sprig/v3.unset +- List -## until -Builds a range of integers. `until 5` will return a list `[0, 1, 2, 3, 4]`. -_Implementation_: github.com/Masterminds/sprig/v3.until +_Example_: `mustReverse $myList` -## untilStep -Like `until` generates a list of counting integers but it allows to define a start, stop and step. `untilStep 3 6 2` will return `[3, 5]` by starting with 3 and adding 2 until it is equal or greater than 6. +_Implementation_: `github.com/Masterminds/sprig/v3.mustReverse` -_Implementation_: github.com/Masterminds/sprig/v3.untilStep +## `mustSlice` -## untitle -Removes title casing. `untitle "Hello World"` will return `"hello world"`. -_Implementation_: github.com/Masterminds/sprig/v3.untitle -## upper -Converts the entire string to uppercase. `upper "hello"` will return `HELLO`. +_Implementation_: `github.com/Masterminds/sprig/v3.mustSlice` -_Implementation_: strings.ToUpper +## `mustToDate` +Converts a string to a date. If the string can’t be converted it returns the zero value. It will return an error to the template engine if there is a problem. -## urlJoin -Joins map produced by `urlParse` to produce URL string. `urlJoin (dict "fragment" "fragment" "host" "host:80" "path" "/path" "query" "query" "scheme" "http")` will return `proto://host:80/path?query#fragment`. +_Parameters_: +- Date layout -_Implementation_: github.com/Masterminds/sprig/v3.urlJoin +- Date string -## urlParse -Parses string for URL and produces dict with URL parts. For more info check https://golang.org/pkg/net/url/#URL. -_Implementation_: github.com/Masterminds/sprig/v3.urlParse -## values +_Implementation_: `github.com/Masterminds/sprig/v3.mustToDate` +## `mustToJson` -_Implementation_: github.com/Masterminds/sprig/v3.values -## without -Filters items out of a list. It can take more than one filter. -_Implementation_: github.com/Masterminds/sprig/v3.without -## wrap -Wraps text at a given column count. `wrap 80 $text` will wrap the string in `$text` at 80 columns. +_Implementation_: `github.com/Masterminds/sprig/v3.mustToJson` + +## `mustToPrettyJson` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.mustToPrettyJson` + +## `mustToRawJson` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.mustToRawJson` + +## `mustUniq` +Generates a list with all of the duplicates removed. It will return an error to the template engine if there is a problem. + + +_Parameters_: + +- List + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.mustUniq` + +## `mustWithout` +Filters items out of a list. It will return an error to the template engine if there is a problem. + + +_Parameters_: + +- CList + +- Item to filter out + + + + +_Example_: `mustWithout ( list 1 2 3 4 5) 1 3 5` returns `[2, 4]`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.mustWithout` + +## `nindent` + + + + + + + +_Implementation_: `github.com/pluralsh/polly/template.nindent` + +## `nospace` +Removes all whitespace from a string. + + +_Parameters_: + +- String to transform + + + + +_Example_: `nospace "hello w o r l d"` will return `helloworld`. + + + +_Implementation_: `github.com/Masterminds/goutils.DeleteWhiteSpace` + +## `omit` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.omit` + +## `osBase` +Returns the last element of a file path. + + +_Parameters_: + +- File path + + + + +_Example_: `osClean "/foo/bar/../baz"` and `osClean "C:\\foo\\bar\\..\\baz"` will resolve the `..` and return `foo/baz` on Linux and `C:\foo\baz` on Windows. + + + +_Implementation_: `path/filepath.Base` + +## `osClean` +Cleans up a path. + + +_Parameters_: + +- File path + + + + +_Example_: `osClean "/foo/bar/../baz"` and `osClean "C:\\foo\\bar\\..\\baz"` will resolve the `..` and return `foo/baz` on Linux and `C:\foo\baz` on Windows. + + + +_Implementation_: `path/filepath.Clean` + +## `osDir` +Returns the directory, stripping the last part of the path. + + +_Parameters_: + +- File path + + + + +_Example_: `osDir "/foo/bar/baz"` returns `/foo/bar` on Linux, and `osDir "C:\\foo\\bar\\baz"` returns `C:\\foo\\bar` on Windows. + + + +_Implementation_: `path/filepath.Dir` + +## `osExt` +Return the file extension. + + +_Parameters_: + +- File path + + + + +_Example_: `osExt "/foo.bar"` and `osExt "C:\\foo.bar"` will return `.bar` on Linux and Windows, respectively. + + + +_Implementation_: `path/filepath.Ext` + +## `osIsAbs` +Checks whether a file path is absolute. + + +_Parameters_: + +- File path + + + + + + +_Implementation_: `path/filepath.IsAbs` + +## `pick` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.pick` + +## `pluck` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.pluck` + +## `plural` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.plural` + +## `prepend` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.prepend` + +## `push` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.push` + +## `quote` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.quote` + +## `randAlpha` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.randAlpha` + +## `randAlphaNum` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.randAlphaNumeric` + +## `randAscii` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.randAscii` + +## `randBytes` +Accepts a count and generates cryptographically secure random sequence of bytes. The sequence is returned as a Base64 encoded string. + + +_Parameters_: + +- Number of bytes to generate + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.randBytes` + +## `randInt` +Returns a random integer value from min (inclusive) to max (exclusive). + + +_Parameters_: + +- Min value (inclusive) + +- Max value (exclusive) + + + + +_Example_: `randInt 12 30` will produce a random number in the range from 12 to 30. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.init.func20` + +## `randNumeric` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.randNumeric` + +## `regexFind` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.regexFind` + +## `regexFindAll` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.regexFindAll` + +## `regexMatch` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.regexMatch` + +## `regexQuoteMeta` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.regexQuoteMeta` + +## `regexReplaceAll` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.regexReplaceAll` + +## `regexReplaceAllLiteral` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.regexReplaceAllLiteral` + +## `regexSplit` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.regexSplit` + +## `repeat` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.init.func2` + +## `replace` + + + + + + + +_Implementation_: `strings.ReplaceAll` + +## `rest` +Gets tail of the list (everything but the first item). + + +_Parameters_: + +- List + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.rest` + +## `reverse` +Produces a new list with the reversed elements of the given list. + + +_Parameters_: + +- List + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.reverse` + +## `round` +Returns a float value with the remainder rounded to the given number to digits after the decimal point. + + +_Parameters_: + +- Float number + +- Number of digits to round to + + + + +_Example_: `round 123.55555 3` will return `123.556`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.round` + +## `semver` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.semver` + +## `semverCompare` + + + + + + +_Aliases_: `semver_compare`\ +_Implementation_: `github.com/Masterminds/sprig/v3.semverCompare` + +## `seq` +Works like Bash `seq` command. Specify 1 parameter (`end`) to generate all counting integers between 1 and `end` inclusive. Specify 2 parameters (`start` and `end`) to generate all counting integers between `start` and `end` inclusive incrementing or decrementing by 1. Specify 3 parameters (`start`, `step` and `end`) to generate all counting integers between `start` and `end` inclusive incrementing or decrementing by `step`. + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.seq` + +## `set` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.set` + +## `sha1sum` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.sha1sum` + +## `sha256sum` +Generates SHA256 hash of an input. + + +_Parameters_: + +- Input value + + + + + +_Aliases_: `sha26sum`\ +_Implementation_: `github.com/Masterminds/sprig/v3.sha256sum` + +## `sha512sum` +Generates SHA512 hash of an input. + + +_Parameters_: + +- Input value + + + + +_Example_: `sha512sum "Hello world!"`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.sha512sum` + +## `shuffle` +Shuffles a string. + + +_Parameters_: + +- String to shuffle + + + + +_Example_: `shuffle "hello"`. + + + +_Implementation_: `github.com/huandu/xstrings.Shuffle` + +## `slice` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.slice` + +## `snakecase` +Converts a string from camelCase to snake_case. + + +_Parameters_: + +- String to convert + + + + +_Example_: `camelcase "FirstName"` returns `first_name`. + + + +_Implementation_: `github.com/huandu/xstrings.ToSnakeCase` + +## `sortAlpha` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.sortAlpha` + +## `split` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.split` + +## `splitList` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.init.func13` + +## `splitn` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.splitn` + +## `squote` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.squote` + +## `sub` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.init.func16` + +## `subf` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.init.func23` + +## `substr` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.substring` + +## `swapcase` +Swaps the case of a string using a word based algorithm. + + +_Parameters_: + +- String to convert + + + + +_Example_: `swapcase "This Is A.Test"` returns `tHIS iS a.tEST`. + + + +_Implementation_: `github.com/Masterminds/goutils.SwapCase` + +## `ternary` +Takes two values and a test value. If the test value is true, the first value will be returned. If the test value is false, the second value will be returned. This is similar to the C ternary operator. + + +_Parameters_: + +- First value + +- Second value + +- Test value + + + + +_Example_: `ternary "foo" "bar" true` or `true | "foo" "bar"` will return `"foo"`. + + + +_Implementation_: `github.com/pluralsh/polly/template.ternary` + +## `title` +Converts a string to title case. + + +_Parameters_: + +- String + + + + +_Example_: `title "hello world"` returns `"Hello World"`. + + + +_Implementation_: `strings.Title` + +## `toDate` +Converts a string to a date. If the string can’t be converted it returns the zero value. + + +_Parameters_: + +- Date layout + +- Date string + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.toDate` + +## `toDecimal` +Converts a Unix octal to a `int64`. + + +_Parameters_: + +- Unix octal + + + + +_Example_: `"0777" | toDecimal` will convert `0777` to `511` and return the value as `int64`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.toDecimal` + +## `toJson` +Encodes an item into JSON string. If the item cannot be converted to JSON the function will return an empty string. + + +_Parameters_: + +- An item to encode + + + + +_Example_: `toJson .Item` returns JSON string representation of `.Item`. + + +_Aliases_: `to_json`\ +_Implementation_: `github.com/Masterminds/sprig/v3.toJson` + +## `toPrettyJson` +Encodes an item into pretty (intended) JSON string. + + +_Parameters_: + +- An item to encode + + + + +_Example_: `toPrettyJson .Item` returns intended JSON string representation of `.Item`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.toPrettyJson` + +## `toRawJson` +Encodes an item into JSON string with HTML characters unescaped. + + +_Parameters_: + +- An item to encode + + + + +_Example_: `toRawJson .Item` returns unescaped JSON string representation of `.Item`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.toRawJson` + +## `toString` +Converts to a string. + + +_Parameters_: + +- Value + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.strval` + +## `toStrings` +Converts a list, slice or array to a list of strings. + + +_Parameters_: + +- List + + + + +_Example_: `list 1 2 3 | toString` converts `1`, `2` and `3` to strings and then returns them as a list. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.strslice` + +## `trim` +Removes space from either side of a string. + + +_Parameters_: + +- String to trim + + + + +_Example_: `trim " hello "` will return `hello`. + + + +_Implementation_: `strings.TrimSpace` + +## `trimAll` +Removes given characters from the front or back of a string. + + +_Parameters_: + +- Character to remove + +- String to trim + + + + +_Example_: `trimAll "$" "$5.00"` will return `5.00` (as a string). + + + +_Implementation_: `github.com/Masterminds/sprig/v3.init.func4` + +## `trimPrefix` +Trims just the prefix from a string. + + +_Parameters_: + +- Character to remove + +- String to trim + + + + +_Example_: `trimPrefix "-" "-hello"` will return `hello`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.init.func6` + +## `trimSuffix` +Trims just the suffix from a string. + + +_Parameters_: + +- Character to remove + +- String to trim + + + + +_Example_: `trimSuffix "-" "hello-"` will return `hello`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.init.func5` + +## `trimall` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.init.func3` + +## `trunc` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.trunc` + +## `tuple` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.list` + +## `typeIs` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.typeIs` + +## `typeIsLike` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.typeIsLike` + +## `typeOf` + + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.typeOf` + +## `uniq` +Generates a list with all of the duplicates removed. + + +_Parameters_: + +- List + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.uniq` + +## `unixEpoch` +Returns the seconds since the Unix epoch for a time. + + +_Parameters_: + +- Time (`time.Time`) + + + + +_Example_: `now | unixEpoch` + + + +_Implementation_: `github.com/Masterminds/sprig/v3.unixEpoch` + +## `unset` +Given a map and a key it deletes the key from the map. It returns dictionary. Note that if the key is not found this operation will simply return. No error will be generated. + + +_Parameters_: + +- Map + +- Key of an item to delete + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.unset` + +## `until` +Builds a range of integers. + + +_Parameters_: + +- Max value (exclusive) + + + + +_Example_: `until 5` will return a list `[0, 1, 2, 3, 4]`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.until` + +## `untilStep` +Like `until` generates a list of counting integers but it allows to define a start, stop and step. + + +_Parameters_: + +- Start value (inclusive) + +- Max value (exclusive) + +- Step + + + + +_Example_: `untilStep 3 6 2` will return `[3, 5]` by starting with 3 and adding 2 until it is equal or greater than 6. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.untilStep` + +## `untitle` +Removes title casing. + + +_Parameters_: + +- String to transform + + + + +_Example_: `untitle "Hello World"` returns `"hello world"`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.untitle` + +## `upper` +Converts the entire string to uppercase. + + +_Parameters_: + +- String to transform + + + + +_Example_: `upper "hello"` returns `HELLO` + + + +_Implementation_: `strings.ToUpper` + +## `urlJoin` +Joins map produced by `urlParse` to produce URL string. + + +_Parameters_: + +- Map produced by `urlParse` + + + + +_Example_: `urlJoin (dict "fragment" "fragment" "host" "host:80" "path" "/path" "query" "query" "scheme" "http")` returns `proto://host:80/path?query#fragment`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.urlJoin` + +## `urlParse` +Parses string for URL and produces dict with URL parts. For more info check https://golang.org/pkg/net/url/#URL. + + +_Parameters_: + +- String with URL + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.urlParse` + +## `values` +Returns list of all values from a map. + + +_Parameters_: + +- Map + + + + + + +_Implementation_: `github.com/Masterminds/sprig/v3.values` + +## `without` +Filters items out of a list. It can take more than one filter. + + +_Parameters_: + +- List + +- Item to filter out + + + + +_Example_: `without ( list 1 2 3 4 5) 1 3 5` returns `[2, 4]`. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.without` + +## `wrap` +Wraps text at a given column count. + + +_Parameters_: + +- Column count + +- Text + + + + +_Example_: `wrap 80 $text` will wrap the string in `$text` at 80 columns. + + + +_Implementation_: `github.com/Masterminds/sprig/v3.init.func7` + +## `wrapWith` +Works as `wrap` but lets you specify the string to wrap with (`wrap` uses `\n`). + + +_Parameters_: + +- Column count + +- String to wrap with + +- Text -_Implementation_: github.com/Masterminds/sprig/v3.init.func7 -## wrapWith -Works as `wrap` but lets you specify the string to wrap with (`wrap` uses `\n`). `wrapWith 5 "\t" "Hello world"` will return `hello world` (where the whitespace is an ASCII tab character). +_Example_: `wrapWith 5 "\t" "Hello world"` returns `hello world` (where the whitespace is an ASCII tab character). -_Implementation_: github.com/Masterminds/sprig/v3.init.func8 +_Implementation_: `github.com/Masterminds/sprig/v3.init.func8`