Skip to content

feat(tmpl): add sprig template helpers - #19

Merged
kwent merged 5 commits into
rootlyhq:masterfrom
abdellahhn:feat/spring-funcmap
Sep 8, 2026
Merged

kwent merged 5 commits into
rootlyhq:masterfrom
abdellahhn:feat/spring-funcmap

Conversation

@abdellahhn

@abdellahhn abdellahhn commented Sep 4, 2026 •

Copy link
Copy Markdown

Adds the Sprig (https://github.com/Masterminds/sprig) function library to the template engine, so field-mapping templates can use helpers like lower, upper, trim, replace, dig, etc.

Non-breaking

Layered as an overlay: start from sprig.TxtFuncMap(), then re-register the repo's get/default on top so their behavior is unchanged. This matters because Sprig's versions differ, default has reversed arg order, and get returns "" instead of erroring on a missing key, so overriding them keeps existing configs and doc examples working.

Tests

  • lower is available and works.
  • Regression: default keeps the repo's value-first arg order.

go build and go test ./... all pass.

dependabot Bot and others added 4 commits August 20, 2026 22:43
Bumps the minor-and-patch group with 1 update: [charm.land/lipgloss/v2](https://github.com/charmbracelet/lipgloss).


Updates `charm.land/lipgloss/v2` from 2.0.5 to 2.0.6
- [Release notes](https://github.com/charmbracelet/lipgloss/releases)
- [Commits](charmbracelet/lipgloss@v2.0.5...v2.0.6)

---
updated-dependencies:
- dependency-name: charm.land/lipgloss/v2
  dependency-version: 2.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

@kwent kwent left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed Sprig registration, preservation of strict get and value-first default semantics, and regression tests. Added documentation for helpers and missing-key fallbacks, and resolved the module conflict with the reviewed Lip Gloss update. Fresh CI is green on c2f1cdd (build, tests, vet, lint, govulncheck); the combined four-PR tree also passes go test -race ./.... Live API integration remains blocked by the shared test account trial expiration.

@kwent kwent left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed the final master merge and module conflict resolution. The diff contains only Sprig integration, its regressions, and documentation; updated Lip Gloss dependencies are preserved. Fresh CI is green on 0dba6b3. The combined release tree also passed build, race tests, and vet.

@kwent
kwent merged commit ec6d75c into rootlyhq:master Sep 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants