Releases: hairyhenderson/gomplate
v5.1.0
5.1.0 (2026-04-28)
Features
- coll: support slices in coll.Omit (#2546) (be0844b)
- crypto: add unified crypto.DerivePublicKey function (#2500) (2706cb6)
- crypto: finalize experimental crypto functions (#2498) (45255b6), closes #1416
- crypto: New experimental crypto.PBKDF2MCF function (#2429) (0aa7c9c)
- crypto: New Yescrypt and YescryptMCF functions (#2421) (616260b)
- crypto: Rename AES functions for consistent naming (#2501) (8881837)
- datasources: New gcp+meta filesystem support (#2493) (fcbd14f)
- env: New functions env.Env and env.HasEnv (#2492) (41b4ea7)
- schema: add JSON Schema for .gomplate.yaml config files (#2541) (114fe8b)
Bug Fixes
- conv: Print actual argument type in InterfaceSlice error (#2553) (b29effa)
- deps: update aws-sdk-go-v2 monorepo (#2586) (958f3d0)
- deps: update module github.com/hairyhenderson/go-fsimpl to v0.4.1 (#2585) (15d7573)
- deps: update module github.com/invopop/jsonschema to v0.14.0 (#2587) (0b3239d)
- deps: update module k8s.io/client-go to v0.36.0 (#2592) (900cf17)
- flake: remove flakey LookupIPs tests (#2540) (167f91a)
- lint: resolve golangci gosec, nolintlint, and fieldalignment issues (#2542) (45aa9e0)
- random: fix flaky TestItem by checking both items appear (#2525) (1be45f6)
- test: increase plugin timeout to avoid flakes on slow Windows runners (#2543) (0ef47a6)
Documentation
- crypto: shorten SHA function group headings to fix TOC overflow (#2547) (94ce42f), closes #1734
- datasources: Correct aws+smp documentation to reflect changes made in v4 (#2531) (0af83bd)
- dynamically resolve release links via GitHub API (#2528) (7734992)
- fix: update broken Zenko Cloudserver link (#2599) (67757db)
- Upgrade hugo and theme (#2596) (1f84e10)
Dependencies
- actions: bump actions/create-github-app-token in the actions group (#2534) (d6a8368)
- actions: bump docker/login-action from 3.4.0 to 3.7.0 (#2491) (0eade6c)
- actions: bump docker/login-action from 3.7.0 to 4.0.0 (#2521) (655b154)
- actions: bump docker/login-action from 4.0.0 to 4.1.0 (#2555) (7e6c1d1)
- actions: bump docker/setup-buildx-action from 3.12.0 to 4.0.0 (#2524) (7dc7b3e)
- actions: bump docker/setup-qemu-action from 3.7.0 to 4.0.0 (#2522) (36ae69e)
- actions: bump the actions group across 1 directory with 3 updates (#2527) (17dd554)
- actions: bump webiny/action-conventional-commits (#2488) (cfddb9f)
- actions: bump webiny/action-conventional-commits (#2573) (ea8bcd3)
- docker: bump golang from 1.25-alpine to 1.26-alpine (#2507) (cc806e4)
- go: bump cuelang.org/go from 0.15.3 to 0.15.4 (#2490) (3713efb)
- go: bump cuelang.org/go from 0.15.4 to 0.16.0 (#2520) (f6b1099)
- go: bump cuelang.org/go from 0.16.0 to 0.16.1 (#2561) (e4574f1)
- go: bump github.com/aws/aws-sdk-go-v2/service/ec2 (#2489) (05eb3aa)
- go: bump github.com/buger/jsonparser from 1.1.1 to 1.1.2 (#2545) (a622590)
- go: bump github.com/cloudflare/circl from 1.6.1 to 1.6.3 (#2516) (6bdc4c7)
- go: bump github.com/go-git/go-git/v5 from 5.16.4 to 5.16.5 (#2503) (a28f44f)
- go: bump github.com/go-git/go-git/v5 from 5.17.0 to 5.18.0 (#2571) (1299e3f)
- go: bump github.com/go-jose/go-jose/v4 from 4.1.3 to 4.1.4 (#2556) (d487382)
- go: bump github.com/hairyhenderson/go-fsimpl from 0.3.3 to 0.3.4 ([#2496](ht...
v5.0.0
5.0.0 (2026-01-20)
⚠ BREAKING CHANGES
- go: Change module version from v4 to v5 (#2485)
- config: Remove support for templates array form (#2478)
- aws: Remove support for deprecated AWS_META_ENDPOINT env var (#2477)
- go: Require proper context propagation where missing (#2476)
- Remove deprecated functions in preparation for v5 (#2472)
- go: Move aws/ package to internal/aws/
- aws: Replace AWS SDK v1 with v2 (#2439)
Features
- aws: Replace AWS SDK v1 with v2 (#2439) (46fcf9a)
- go: Change module version from v4 to v5 (#2485) (f3a9b01)
Bug Fixes
Documentation
Dependencies
- actions: bump aquasecurity/setup-trivy from 0.2.3 to 0.2.5 (#2482) (467d59a)
- actions: Bump docker/setup-buildx-action from 3.11.1 to 3.12.0 (#2467) (d173a32)
- actions: Bump docker/setup-qemu-action from 3.6.0 to 3.7.0 (#2452) (7480191)
- actions: Bump golangci/golangci-lint-action from 8 to 9 (#2454) (591860b)
- actions: Bump the actions group across 1 directory with 7 updates (#2465) (f82d7b0)
- actions: bump the actions group with 2 updates (#2481) (50d0673)
- go: Bump cuelang.org/go from 0.13.2 to 0.15.3 (#2469) (894a34f)
- go: bump github.com/aws/aws-sdk-go-v2/service/ec2 (#2483) (5a1ab38)
- go: bump github.com/hairyhenderson/go-fsimpl from 0.3.1 to 0.3.2 (#2480) (d7abae4)
- go: bump github.com/hairyhenderson/go-fsimpl from 0.3.2 to 0.3.3 (#2484) (58b71ed)
- go: Bump github.com/itchyny/gojq from 0.12.17 to 0.12.18 (#2460) (4dfad54)
- go: Bump github.com/spf13/cobra from 1.9.1 to 1.10.2 (#2462) (3969fda)
- go: Bump github.com/ugorji/go/codec from 1.3.0 to 1.3.1 (#2451) (5bb94d8)
- go: Bump k8s.io/client-go from 0.33.2 to 0.35.0 (#2466) (93926cf)
- go: Bump the aws-sdk group across 1 directory with 6 updates (#2474) (a90269c)
- go: Bump the golang-x group with 4 updates (#2420) (600e63a)
- go: bump the golang-x group with 4 updates (#2479) (2a40476)
- go: Bump the hashicorp group across 1 directory with 2 updates (#2444) (6494dd2)
- go: Bump to Go 1.25.5 (#2475) (9fb6221)
Miscellaneous Chores
- aws: Remove support for deprecated AWS_META_ENDPOINT env var (#2477) (efe36ec)
- config: Remove support for templates array form (#2478) (c0613ad)
- go: Move aws/ package to internal/aws/ (46fcf9a)
- go: Require proper context propagation where missing (#2476) (c095994)
- Remove deprecated functions in preparation for v5 (#2472) (6ef7149)
v4.3.3
4.3.3 (2025-07-12)
Dependencies
- actions: Bump docker/setup-buildx-action from 3.10.0 to 3.11.1 (#2400) (bb687e1)
- actions: Bump golangci/golangci-lint-action from 7 to 8 (#2373) (b816afe)
- docker: Bump alpine from 3.21 to 3.22 (#2386) (6e100c9)
- go: Bump cuelang.org/go from 0.12.1 to 0.13.0 (#2380) (f80f64c)
- go: Bump cuelang.org/go from 0.13.0 to 0.13.1 (#2395) (8a96151)
- go: Bump cuelang.org/go from 0.13.1 to 0.13.2 (#2403) (91bf028)
- go: Bump github.com/aws/aws-sdk-go in the aws-sdk group (#2369) (d6540bd)
- go: Bump github.com/hairyhenderson/go-fsimpl from 0.2.5 to 0.3.0 (#2368) (e3c3b0f)
- go: Bump github.com/hairyhenderson/go-fsimpl from 0.3.0 to 0.3.1 (#2382) (38ce9b8)
- go: Bump github.com/hashicorp/vault/api in the hashicorp group (#2390) (554aeeb)
- go: Bump github.com/hashicorp/vault/api/auth/aws (#2392) (68faa6b)
- go: Bump github.com/lmittmann/tint from 1.0.7 to 1.1.0 (#2378) (714ee64)
- go: Bump github.com/lmittmann/tint from 1.1.0 to 1.1.1 (#2385) (a8d4924)
- go: Bump github.com/lmittmann/tint from 1.1.1 to 1.1.2 (#2394) (255b1e7)
- go: Bump github.com/Masterminds/semver/v3 from 3.3.1 to 3.4.0 (#2404) (1899857)
- go: Bump github.com/ugorji/go/codec from 1.2.12 to 1.2.14 (#2383) (3e519b3)
- go: Bump github.com/ugorji/go/codec from 1.2.14 to 1.3.0 (#2399) (85db600)
- go: Bump golang.org/x/net in the go_modules group (#2366) (d1bbf8c)
- go: Bump k8s.io/client-go from 0.32.3 to 0.33.1 (#2377) (7375cf0)
- go: Bump k8s.io/client-go from 0.33.1 to 0.33.2 (#2401) (6ba1deb)
- go: Bump the golang-x group across 1 directory with 4 updates (#2407) (e7070c1)
- go: Bump the golang-x group with 2 updates (#2391) (4a2edcb)
- go: Bump the golang-x group with 4 updates (#2374) (f0e9343)
- go: Go 1.24.5 (#2408) (b6418c7)
v4.3.2
4.3.2 (2025-04-14)
Bug Fixes
Dependencies
- actions: Bump actions/create-github-app-token in the actions group (#2359) (c2b5f75)
- actions: Bump aquasecurity/setup-trivy from 0.2.2 to 0.2.3 (#2363) (2853363)
- actions: Bump docker/login-action from 3.3.0 to 3.4.0 (#2354) (811d337)
- actions: Bump golangci/golangci-lint-action from 6 to 7 (#2357) (623a7d5)
- go: Bump cuelang.org/go from 0.12.0 to 0.12.1 (#2360) (40eab0b)
- go: Bump github.com/golang-jwt/jwt/v5 in the go_modules group (#2356) (238bc62)
- go: Bump github.com/hairyhenderson/go-fsimpl from 0.2.4 to 0.2.5 (#2352) (3e0859b)
- go: Bump k8s.io/client-go from 0.32.2 to 0.32.3 (#2349) (e713cb0)
- go: Bump the golang-x group with 4 updates (#2361) (03c56f3)
v4.3.1
4.3.1 (2025-03-11)
Bug Fixes
Documentation
Dependencies
- actions: Bump docker/setup-buildx-action from 3.8.0 to 3.9.0 (#2317) (4ec9835)
- actions: Bump docker/setup-buildx-action from 3.9.0 to 3.10.0 (#2336) (80a41f1)
- actions: Bump docker/setup-qemu-action from 3.2.0 to 3.4.0 (#2318) (c8569a3)
- actions: Bump docker/setup-qemu-action from 3.4.0 to 3.6.0 (#2337) (16dc98f)
- docker: Bump golang from 1.23-alpine to 1.24-alpine (#2320) (c3c682c)
- go: Bump cuelang.org/go from 0.11.0 to 0.12.0 (#2310) (9785caa)
- go: Bump github.com/aws/aws-sdk-go from 1.55.5 to 1.55.6 (#2300) (7942441)
- go: Bump github.com/go-jose/go-jose/v4 in the go_modules group (#2334) (63105ec)
- go: Bump github.com/gosimple/slug from 1.14.0 to 1.15.0 (#2295) (ce234c8)
- go: Bump github.com/hairyhenderson/go-fsimpl from 0.2.1 to 0.2.4 (#2347) (55c150e)
- go: Bump github.com/hashicorp/vault/api/auth/aws (#2328) (6767724)
- go: Bump github.com/lmittmann/tint from 1.0.6 to 1.0.7 (#2308) (80c9a89)
- go: Bump github.com/Shopify/ejson from 1.5.3 to 1.5.4 (#2312) (315650a)
- go: Bump github.com/spf13/cobra from 1.8.1 to 1.9.1 (#2327) (a5fdb3c)
- go: Bump golang.org/x/crypto from 0.32.0 to 0.35.0 (#2332) (244da8b)
- go: Bump golang.org/x/net in the go_modules group (#2326) (3a48256)
- go: Bump golang.org/x/term from 0.27.0 to 0.29.0 (#2316) (62316f5)
- go: Bump golang.org/x/text from 0.21.0 to 0.22.0 (#2314) (72116a2)
- go: Bump gotest.tools/v3 from 3.5.1 to 3.5.2 (#2333) (f33d33d)
- go: Bump k8s.io/client-go from 0.32.0 to 0.32.2 (#2321) (3b64fa9)
- go: Bump the golang-x group with 4 updates (#2343) (c327873)
v4.3.0
4.3.0 (2024-12-17)
Features
Bug Fixes
- datasources: Fix aws+sm bug when reading secrets not starting with slash (#2284) (a69bb64)
- datasources: Properly support aws+sm with args (#2291) (ddc4efb)
- fs: Cache data in stdinfs (#2288) (cd74bb8)
- fs: fix mergefs bug where files were opened too many times (#2287) (7eb7829)
Documentation
- fix: Quotation in external templates example (#2263) (d512164)
- fix: Typo of description in functions/test (#2265) (478b745)
Dependencies
- actions: Bump docker/setup-buildx-action from 3.7.1 to 3.8.0 (#2286) (86b934e)
- docker: Bump alpine from 3.20 to 3.21 (#2278) (9439cad)
- go: Bump cuelang.org/go from 0.10.1 to 0.11.0 (#2267) (7b89601)
- go: Bump github.com/hairyhenderson/go-fsimpl from 0.1.8 to 0.2.0 (#2271) (e29e3ee)
- go: Bump github.com/hairyhenderson/go-fsimpl from 0.2.0 to 0.2.1 (#2290) (d7e8e19)
- go: Bump github.com/itchyny/gojq from 0.12.16 to 0.12.17 (#2272) (fe927f9)
- go: Bump github.com/lmittmann/tint from 1.0.5 to 1.0.6 (#2285) (e04f119)
- go: Bump github.com/Masterminds/semver/v3 from 3.3.0 to 3.3.1 (#2268) (71a58a1)
- go: Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 (#2270) (67cf0b2)
- go: Bump golang.org/x/crypto from 0.29.0 to 0.30.0 (#2277) (e2cf0df)
- go: Bump golang.org/x/crypto from 0.30.0 to 0.31.0 (#2280) (f4d9693)
- go: Bump golang.org/x/sys from 0.27.0 to 0.28.0 (#2274) (2e9d862)
- go: Bump golang.org/x/term from 0.26.0 to 0.27.0 (#2275) (b53e9e4)
- go: Bump k8s.io/client-go from 0.31.2 to 0.31.3 (#2269) (8d23672)
- go: Bump k8s.io/client-go from 0.31.3 to 0.32.0 (#2282) (aaaf0da)
v4.2.0
4.2.0 (2024-11-10)
Features
Bug Fixes
- datasources: Properly handle datasources and other URLs beginning with '../' (#2255) (53d6ca0)
- lint: Address new lint warnings from golangci-lint 1.62 (#2256) (a13844c)
- lint: Fix or ignore lint errors (#2228) (69d3e0c)
- strings: Avoid potential overflow on 32-bit systems (#2257) (1bd86d8)
Documentation
- fix: Fix example output for coll.Merge (#2252) (60a575f)
- fix: Minor fix in documentation related to
--exclude-processing(#2238) (52abefa) - links: Fix broken link (#2254) (7e64928)
Dependencies
- actions: Bump docker/login-action from 3.2.0 to 3.3.0 (#2189) (8f40d1f)
- actions: Bump docker/setup-buildx-action from 3.4.0 to 3.6.1 (#2198) (71f53aa)
- actions: Bump docker/setup-buildx-action from 3.6.1 to 3.7.1 (#2233) (f908325)
- actions: Bump docker/setup-qemu-action from 3.1.0 to 3.2.0 (#2188) (2869ba1)
- docker: Bump golang from 1.22-alpine to 1.23-alpine (#2212) (8946529)
- go: Bump cuelang.org/go from 0.9.2 to 0.10.1 (#2241) (ca531f2)
- go: Bump github.com/aws/aws-sdk-go from 1.54.15 to 1.54.16 (#2172) (19cd050)
- go: Bump github.com/aws/aws-sdk-go from 1.54.16 to 1.55.5 (#2200) (6cdc97d)
- go: Bump github.com/hairyhenderson/go-fsimpl from 0.1.7 to 0.1.8 (#2243) (d464787)
- go: Bump github.com/hashicorp/go-sockaddr from 1.0.6 to 1.0.7 (#2229) (bcb33a2)
- go: Bump github.com/hashicorp/vault/api from 1.14.0 to 1.15.0 (#2223) (2e06943)
- go: Bump github.com/hashicorp/vault/api/auth/aws (#2224) (87edb20)
- go: Bump github.com/lmittmann/tint from 1.0.4 to 1.0.5 (#2178) (cb30e90)
- go: Bump github.com/Masterminds/semver/v3 from 3.2.1 to 3.3.0 (#2216) (8d8d696)
- go: Bump github.com/Shopify/ejson from 1.5.2 to 1.5.3 (#2247) (2622800)
- go: Bump golang.org/x/crypto from 0.25.0 to 0.27.0 (#2221) (33faeb3)
- go: Bump golang.org/x/crypto from 0.27.0 to 0.29.0 (#2248) (94716fc)
- go: Bump golang.org/x/sys from 0.22.0 to 0.24.0 (#2209) (9900424)
- go: Bump golang.org/x/term from 0.22.0 to 0.24.0 (#2219) (ab5d4ad)
- go: Bump golang.org/x/text from 0.16.0 to 0.17.0 (#2207) (9ab0fc9)
- go: Bump golang.org/x/text from 0.17.0 to 0.18.0 (#2220) (8c16576)
- go: Bump google.golang.org/grpc in the go_modules group (#2175) (836cbf0)
- go: Bump k8s.io/client-go from 0.30.2 to 0.30.3 (#2183) (e13e016)
- go: Bump k8s.io/client-go from 0.30.3 to 0.31.1 (#2225) (c60a045)
- go: Bump k8s.io/client-go from 0.31.1 to 0.31.2 (#2242) (e080b07)
v4.1.0
4.1.0 (2024-07-06)
Features
Bug Fixes
Documentation
- datasources: clarify state of Vault KV v2 support (#2154) (c9643ca)
- fix: Fix broken links, add CI to check (#2156) (bdf4f8c)
- fix: Update docs configs to work with the latest hugo theme version (#2155) (17eb360)
Dependencies
- actions: Bump docker/setup-buildx-action from 3.3.0 to 3.4.0 (#2163) (129ff6b)
- actions: Bump docker/setup-qemu-action from 3.0.0 to 3.1.0 (#2160) (16ebbbe)
- go: Bump github.com/aws/aws-sdk-go from 1.54.10 to 1.54.11 (#2152) (e0a6e4f)
- go: Bump github.com/aws/aws-sdk-go from 1.54.11 to 1.54.13 (#2158) (720c70c)
- go: Bump github.com/aws/aws-sdk-go from 1.54.13 to 1.54.14 (#2159) (114c54d)
- go: Bump github.com/aws/aws-sdk-go from 1.54.14 to 1.54.15 (#2165) (51947a7)
- go: Bump github.com/hairyhenderson/go-fsimpl from 0.1.6 to 0.1.7 (#2167) (80b7c5a)
- go: Bump golang.org/x/term from 0.21.0 to 0.22.0 (#2162) (59192ec)
v4.0.1
This release is mainly to fix #2121 - a bug preventing gomplate v4.0.0 from working on 32-bit systems.
4.0.1 (2024-06-28)
Bug Fixes
Documentation
Dependencies
- go: Bump cuelang.org/go from 0.9.1 to 0.9.2 (#2142) (720960e)
- go: Bump github.com/aws/aws-sdk-go from 1.54.2 to 1.54.6 (699a2ed)
- go: Bump github.com/aws/aws-sdk-go from 1.54.6 to 1.54.8 (#2139) (a3475c0)
- go: Bump github.com/aws/aws-sdk-go from 1.54.8 to 1.54.9 (#2143) (715f2c2)
- go: Bump github.com/aws/aws-sdk-go from 1.54.9 to 1.54.10 (#2145) (227b65d)
- go: bump github.com/hack-pad/hackpadfs (#2127) (e6c032b)
- go: Bump github.com/hack-pad/hackpadfs from 0.2.2 to 0.2.3 (#2131) (4805247)
- go: Bump github.com/hack-pad/hackpadfs from 0.2.3 to 0.2.4 (#2137) (eddceaa)
- go: Bump github.com/hairyhenderson/go-fsimpl from 0.1.4 to 0.1.5 (#2146) (7e425e1)
- go: bump github.com/hairyhenderson/go-fsimpl to fix 32-bit panic (#2128) (5104b19)
v4.0.0
v4.0.0
🥳 It's finally here! Welcome to gomplate v4.0.0! This release is a major release, with breaking changes. Read on for more details...
Probably the most important feature that's evolved in gomplate over the years is its support for reading and parsing data from a variety of sources. Using URLs to specify where to find data has proven to be quite flexible, and has allowed for a lot of different data sources to be supported.
In early 2021, I took what I had learned from supporting all of these different data sources, and I created a new module called go-fsimpl, which provides a number of Go filesystem implementations that can be used with Go's filesystem interfaces.
My goal with go-fsimpl was always to use it in gomplate, and now that it's data source support has reached parity with gomplate, it's time to make the switch! As a result, and because go-fsimpl presents a much more consistent and unified approach to data sources, I've had to drop support for one data source, and in fixing some inconsistencies in how URLs have been handled by some of the data sources, I've had to make some breaking changes there as well.
Breaking changes
Dropped support for the BoltDB data source
Support for the boltdb URL scheme has been removed. The implementation was never very robust, and I'm not aware of anyone using it. It had some unique quirks that would have made it quite difficult to support in go-fsiml as-is, so I've decided to drop it.
No more slim binaries
The slim binaries were deprecated in v3.11, and will no longer be produced.
Stricter URL handling
Subpaths are now always relative URLs
When using the datasource function with a subpath (second argument), the subpath has previously been intepreted by some data sources as a simple addition to the URL, and by others as a relative URL to be interpreted relative to the data source's base URL (as specified by the --datasource flag).
Now, all data sources will interpret the subpath as a relative URL, and will resolve it relative to the data source's base URL. This means that, given a base URL of git+https://github.com/hairyhenderson/gomplate//random and a subpath of random.go, the resulting URL will be git+https://github.com/hairyhenderson/gomplate//random.go. To correct this, make sure that base URLs end with a trailing slash when the last component is a directory.
Also, if the subpath begins with a slash, it will be interpreted as an absolute path, and will replace the base URL's path. For example, given a base URL of git+file:///tmp/repos//myrepo/ and a subpath of /myfile.txt, the resulting URL will be git+file:///myfile.txt. To correct this, make sure that subpaths don't begin with a slash. Note that for the special // separator indicating the separation between a Git repository and the path within, a subpath should now begin with .// rather than //.
This affects at least the git and file data sources.
Directories in datasource URLs must end with a slash
Previously, some data sources would assume URLs that end without a trailing slash are directories, and relative lookups would be performed within that directory. This was inconsistent with how URLs are normally interpreted, and could lead to unexpected results.
Now, all data sources will always interpret URLs without a trailing slash as files, and relative lookups will be performed within the parent directory of the URL.
For example, given a base URL of vault:///secret and a subpath of foo, the resulting URL will be vault:///foo. To correct this, make sure that base URLs end with a trailing slash when the last component is a directory.
Consistent data values
The aws+smp data source previously returned the AWS output object, with both metadata and data. Users needed to reference the Value field to get the actual data. Now, the aws+smp data source will return the data directly.
The consul data source supports directory semantics, but previously returned all the data as a JSON array of key/value pair objects. Now, the consul data source will return directory listings like all other data sources, as a JSON array of strings (the names of the keys).
Vault app-id authentication support removed
Support for the Vault "app-id" authentication method has been removed. This method was deprecated in Vault 0.6.1, and removed in Vault 1.13. If you're still using this method, you must switch to a different authentication method. Consider the "approle" method as a similar replacement.
The suppressEmpty behaviour is now always enabled
In previous versions of gomplate, output that consist only of whitespace would by default still be written to files, with the suppressEmpty flag or GOMPLATE_SUPPRESS_EMPTY environment variable being required to suppress this behaviour.
Now, this behaviour is always enabled, and the suppressEmpty flag and GOMPLATE_SUPPRESS_EMPTY environment variable have been removed.
Log message formatting changes
A new logging framework is now in use (the standard library's log/slog package), and so error and debug (--verbose) messages will appear differently (different colours for the console format, and key/value pairs may are sorted differently).
Functions returning errors instead of quietly returning 0 on invalid input
Instead of quietly returning 0, a number of functions in the conv namespace will now return an error if the input is invalid.
This includes:
conv.ToInt64,conv.ToInt,conv.ToInt64s,conv.ToInts,conv.ToFloat64,conv.ToFloat64s,conv.ParseInt,conv.ParseFloat,conv.ParseUint,conv.Atoi
Because these functions are used by some other functions, this introduces stricter input validation for these functions:
coll.Flattencrypto.PBKDF2,crypto.Bcrypt,crypto.RSAGenerateKey,crypto.EncryptAES,crypto.DecryptAES,crypto.DecryptAESBytesmath.Abs,math.Add,math.Mul,math.Sub,math.Div,math.Rem,math.Pow,math.Seq,math.Max,math.Min,math.Ceil,math.Floor,math.Roundnet.CIDRHost,net.CIDRSubnets,net.CIDRSubnetSizesrandom.ASCII,random.Alpha,random.AlphaNum,random.String,random.Number,random.Floatregexp.FindAll,regexp.Splitstrings.Abbrev,strings.WordWraptime.Nanosecond,time.Microsecond,time.Millisecond,time.Second,time.Minute,time.Hour
Functions in the regexp namespace now return errors instead of panicking
Previously, the regexp.Match and regexp.Replace functions would panic if the regular expression was invalid. Now, they will return an error instead.
Removed functions
The following functions have been removed:
conv.Dict,conv.Slice,conv.Has- These have been deprecated since v3.2.0 and have been replaced withcoll.Dict,coll.Slice, andcoll.Has.
Deprecations
- A number of functions are deprecated, and will likely be removed in v5:
- the
slicealias forcoll.Slice(usecoll.Sliceinstead) - The
net.Parse*functions which produced values from theinet.af/netaddrmodule have been deprecated and replaced with functions using the Go standard library'snet/netippackage:net.ParseIP(usenet.ParseAddrinstead)net.ParseIPPrefix(usenet.ParsePrefixinstead)net.ParseIPRange(usenet.ParseRangeinstead)
- the
- The array form of configuring nested templates is deprecated, and a new map-based form is now available. This will be removed in a later v4 minor release (i.e. not in v4.0.0, but before v5).
- Support for the
AWS_META_ENDPOINTenvironment variable for overriding the IMDS endpoint inawsfunctions has been deprecated in favor of the AWS-nativeAWS_EC2_METADATA_SERVICE_ENDPOINT. This will be removed in a later v4 minor release (i.e. not in v4.0.0, but before v5). - A number of functions and types in the Go API are deprecated. Using a linter like
staticcheckwill help you find these in your code if you're using gomplate as a module. Follow the instructions in the deprecation comments to find out what to use instead.
Thanks
Plenty of people have contributed to gomplate by filing issues, suggesting new features, or submitting pull requests. I'd like to especially thank the following people for submitting pull requests in this release: