Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add template functions #215

Closed
wants to merge 1 commit into from
Closed

Conversation

ThisGuyCodes
Copy link

I find myself needing some more basic math when making more dynamic/flexible templates:

  • resize columns based on max width of shown values
    • "assignee" has max width of 10, but this list only has 4-character names
  • dynamically set summary column width based on width of other columns
    • makes templates easier to change
    • works well with dynamic resizing

I'm iffy on adding division, but seemed prudent given the others I added.

@ThisGuyCodes
Copy link
Author

I cannot reason about which test failed (I just see "1 of 94"), but it looks to me like it's an integration test.

I don't think it has anything to do with my changes, but if anyone knows how I can fix it let me know.

@coryb
Copy link
Contributor

coryb commented Oct 25, 2018

Not sure what is up with the test failure, might be random, it has been a while since I ran them.

I was wondering if you have looked at https://github.com/Masterminds/sprig I think all of the functions you added could be imported from sprig and then we would get extra goodies for "free".

-Cory

@sstarcher
Copy link

Sprig would be a nice addition

coryb added a commit that referenced this pull request Oct 2, 2019
add sprig template functions, replaces [#215]
@coryb
Copy link
Contributor

coryb commented Oct 2, 2019

I ended up adding sprig in #283 so all the template functions you wanted should be available now with the exception of prod is added as mul. More docs here:
http://masterminds.github.io/sprig/

I am going to close this PR out now.

@coryb coryb closed this Oct 2, 2019
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.

None yet

3 participants