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

Better range support for go template #21

Open
6 of 7 tasks
akranga opened this issue Dec 26, 2022 · 4 comments · May be fixed by #95
Open
6 of 7 tasks

Better range support for go template #21

akranga opened this issue Dec 26, 2022 · 4 comments · May be fixed by #95
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@akranga
Copy link
Contributor

akranga commented Dec 26, 2022

As a user I want to define a parameter and then iterate over its values in the go template. Today we can define parameter value as a string. Then go-template needs to support split function so it would produce list out of string

  • add split function to gotemplate
  • add compact function to gotemplate
  • add join function to gotemplate
  • add first function to gotemplate
  • add formatSubdomain to gotemplate
  • add unit test
  • update documentation
@akranga akranga added the enhancement New feature or request label Dec 26, 2022
@akranga akranga self-assigned this Dec 26, 2022
@arkadijs
Copy link
Collaborator

IIRC, templating engine supports Sprig functions.

@akranga
Copy link
Contributor Author

akranga commented Dec 30, 2022

@arkadijs thanks! I was thinking about Sprig there are lot functions... not sure if all needed for go templates and not sure if we can test all of them... Also from usability perspective, functions might be confusing for the user. For example it maybe hard for user to distinguish with which type do they operate etc... So, variable arguments and good type guessing might be more friendlier nature...

  • we can always fallback to sprig indeed!

@arkadijs
Copy link
Collaborator

arkadijs commented Dec 30, 2022

@akranga
Copy link
Contributor Author

akranga commented Aug 16, 2023

It looks like everything except formatSubdomain can be removed now

@akranga akranga added the help wanted Extra attention is needed label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants