Skip to content

feat: Add basic math in templates and use it for checks read-data - #675

Open
MarcWort wants to merge 1 commit into
creativeprojects:masterfrom
MarcWort:templ-math
Open

feat: Add basic math in templates and use it for checks read-data#675
MarcWort wants to merge 1 commit into
creativeprojects:masterfrom
MarcWort:templ-math

Conversation

@MarcWort

Copy link
Copy Markdown
Contributor

Hi,

I needed a way to do monthly scans on part of my repositories, which required the modulo operation. While working on it, I thought some basic math template functions would be cleaner than the current, fairly hacky workaround described in the docs.

Let me know what you think, and if anything needs to change.

Thank you for this awesome project.

@codecov

codecov Bot commented Aug 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.73%. Comparing base (65f4135) to head (a5e331d).

Files with missing lines Patch % Lines
util/templates/functions.go 60.00% 6 Missing ⚠️

❌ Your patch check has failed because the patch coverage (60.00%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #675      +/-   ##
==========================================
- Coverage   81.76%   81.73%   -0.03%     
==========================================
  Files         161      161              
  Lines       12009    12024      +15     
==========================================
+ Hits         9818     9827       +9     
- Misses       1692     1698       +6     
  Partials      499      499              
Flag Coverage Δ
unittests 79.99% <60.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@MarcWort

Copy link
Copy Markdown
Contributor Author

Added some more tests in 1af1a95

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.

1 participant