Sprig Versions Save

Useful template functions for Go templates.

v3.2.3

1 year ago

Changed

  • Updated docs (thanks @book987 @aJetHorn @neelayu @pellizzetti @apricote @SaigyoujiYuyuko233 @AlekSi)
  • #348: Updated huandu/xstrings which fixed a snake case bug (thanks @yxxhero)
  • #353: Updated masterminds/semver which included bug fixes
  • #354: Updated golang.org/x/crypto which included bug fixes

v3.2.2

3 years ago

This release is here simply to satisfy the Go module system. The code is precisely the same as v3.2.1.

v3.2.1

3 years ago

This is a security release for Masterminds/goutils v1.1.1. See the Security Advisory.

Changelog

Release 3.2.1 (2021-02-04)

Changed

v3.2.0

3 years ago

Added

  • #211: Added randInt function (thanks @kochurovro)
  • #223: Added fromJson and mustFromJson functions (thanks @mholt)
  • #242: Added a bcrypt function (thanks @robbiet480)
  • #253: Added randBytes function (thanks @MikaelSmith)
  • #254: Added dig function for dicts (thanks @nyarly)
  • #257: Added regexQuoteMeta for quoting regex metadata (thanks @rheaton)
  • #261: Added filepath functions osBase, osDir, osExt, osClean, osIsAbs (thanks @zugl)
  • #268: Added and and all functions for testing conditions (thanks @phuslu)
  • #181: Added float64 arithmetic addf, add1f, subf, divf, mulf, maxf, and minf (thanks @andrewmostello)
  • #265: Added chunk function to split array into smaller arrays (thanks @karelbilek)
  • #270: Extend certificate functions to handle non-RSA keys + add support for ed25519 keys (thanks @misberner)

Changed

  • Removed testing and support for Go 1.12. ed25519 support requires Go 1.13 or newer
  • Using semver 3.1.1 and mergo 0.3.11

Fixed

  • #249: Fix htmlDateInZone example (thanks @spawnia)

NOTE: The dependency github.com/imdario/mergo reverted the breaking change in 0.3.9 via 0.3.10 release.

v3.1.0

3 years ago

NOTE: The dependency github.com/imdario/mergo made a behavior change in 0.3.9 that impacts sprig functionality. Do not use sprig with a version newer than 0.3.8.

Added

  • #225: Added support for generating htpasswd hash (thanks @rustycl0ck)
  • #224: Added duration filter (thanks @frebib)
  • #205: Added seq function (thanks @thadc23)

Changed

  • #203: Unlambda functions with correct signature (thanks @muesli)
  • #236: Updated the license formatting for GitHub display purposes
  • #238: Updated package dependency versions. Note, mergo not updated to 0.3.9 as it causes a breaking change for sprig. That issue is tracked at https://github.com/imdario/mergo/issues/139

Fixed

  • #229: Fix seq example in docs (thanks @kalmant)

v3.0.2

4 years ago

Fixed

  • #220: Updating to semver v3.0.3 to fix issue with <= ranges
  • #218: fix typo elyptical->elliptic in ecdsa key description (thanks @laverya)

v3.0.1

4 years ago

Fixed

  • #212: Updated semver fixing broken constraint checking with ^0.0

v3.0.0

4 years ago

Sprig v3 brings some changes while retaining the same Go API. This should enable projects to migrate to v3 with relative ease.

You might be wondering, why increment the major version if the Go API didn't break? The reason for that is some edge case behavior changed. Most importantly the use of ^ while handling major version 0 use cases with semver. To be cautious, the major version of sprig was incremented to limit the number of surprises.

Added

  • #187: Added durationRound function (thanks @yjp20)
  • #189: Added numerous template functions that return errors rather than panic (thanks @nrvnrvn)
  • #193: Added toRawJson support (thanks @Dean-Coakley)
  • #197: Added get support to dicts (thanks @Dean-Coakley)

Changed

  • #186: Moving dependency management to Go modules
  • #186: Updated semver to v3. This has changes in the way ^ is handled
  • #194: Updated documentation on merging and how it copies. Added example using deepCopy
  • #196: trunc now supports negative values (thanks @Dean-Coakley)

v2.22.0

4 years ago

Added

  • #173: Added getHostByName function to resolve dns names to ips (thanks @fcgravalos)
  • #195: Added deepCopy function for use with dicts

Changed

  • Updated merge and mergeOverwrite documentation to explain copying and how to use deepCopy with it

v2.21.0

4 years ago

Added

  • #122: Added encryptAES/decryptAES functions (thanks @n0madic)
  • #128: Added toDecimal support (thanks @Dean-Coakley)
  • #169: Added list contcat (thanks @astorath)
  • #174: Added deepEqual function (thanks @bonifaido)
  • #170: Added url parse and join functions (thanks @astorath)

Changed

  • #171: Updated glide config for Google UUID to v1 and to add ranges to semver and testify

Fixed

  • #172: Fix semver wildcard example (thanks @piepmatz)
  • #175: Fix dateInZone doc example (thanks @s3than)