sprig
sprig copied to clipboard
Useful template functions for Go templates.
For an argument of type `*string`, there is no case defined for the `toString` function, which causes the `default` case to be selected. The default case uses `fmt.Sprintf("%v", v)`, which...
Fixed trunc function and test added
Upgrade crypto lib version to latest v0.37.0 pkg.go.dev/vuln/GO-2024-3321
Update Crypto version to mitigate [GO-2025-3487](https://pkg.go.dev/vuln/GO-2025-3487) Upgrades golang version to 1.23 Supersede #427
Hi, this is a simple PR to for the upgrade of x/crypto module to version 0.31.0. This includes a fix for a critical vulnerability described in vulnerability report [GO-2024-3321](https://pkg.go.dev/vuln/GO-2024-3321). I...
This adds `indentnonempty`. It behaves the same as `indent`, but skips indenting empty lines. This is useful for indenting generated code. Please let me know if there is a better...
## Problem Statement There are, impressively, around 250 functions for templating included in this package. We would be interested in a way to cherry-pick which functions we include when using...
The hash functions return their result as hex encoded strings. For some integration tasks, we need the base64 encoded hashes. Instead of duplicating all hash functions, I added a single...
Docs says: now | date_modify "-1.5h" but function is `dateModify`.