sprig icon indicating copy to clipboard operation
sprig copied to clipboard

Useful template functions for Go templates.

Results 179 sprig issues
Sort by recently updated
recently updated
newest added

Most of the regex functions are unfortunately significantly broken when it comes to using them in pipelines. By broken I mean the functions technically work, but their usage I don't...

enhancement

Typically a function prefixed with `Must` indicates that should a problem occur, the program will _panic_ rather than return an error. Functions with the `must` prefix are usually used in...

Is it possible? https://go.dev/play/p/9dCgimddEUY ```go package main import ( "html/template" "os" "github.com/Masterminds/sprig/v3" ) func main() { variables := map[string]interface{}{ "integers": []int{1, 2, 3}, } content := ` {{ .integers |...

A new `getHostsByAddr` function for doing reverse DNS lookups. It replicates the existing forward DNS function `getHostByName`, but instead calls [net.LookupAddr](https://pkg.go.dev/net#LookupAddr). The intended downstream use case is to allow [Grafana...

Fixes CVE-2022-27191 I don't think this project was affected by the vulnerability since the bug was in the `crypto/ssh` package and I believe this repo only imports `crypto/bcrypt`. But useful...

Fixed improper syntax for randInt which does not display on GH pages

I used mustToJson against this string: `'[{"dfsdfdsf": "sdfsdf"]'` It didn't throw an error and returned this: `"[{\"dfsdfdsf\": \"sdfsdf\"]"`

Hello, I had this requirement while using sprig in Helm. My use case is simple, on multiple occasions, I have to supply a username/password on a uri with basic authentication,...

(This issues was posted at https://github.com/helm/helm/issues/10876) As defined in http://masterminds.github.io/sprig/dicts.html, the function `pick`, `omit` and like takes variadic string arguments. ``` $new := pick $myDict "name1" "name2" $new := omit...