We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello, I spent some time understanding how to extract the element at index n of an Array
n
Es:
arr := [1,2,3] I want to get arr[1] => 2
I finally found the index function, but is not documented in the docs and I did't find it's declaration in the code.
index
The usage is
{{ index arr 2 }}
and I found references in:
Where does it come from? Should be documented in the list.md doc file?
list.md
I'm sorry if it's something obvious, I'm new to go and sprig. I can provide a PR to the documentation if you point me in the right direction.
Thank you!
The text was updated successfully, but these errors were encountered:
@endorama The index function isn't part of sprig. Rather, it's part of the go templating functions. The following link has more details - https://golang.org/pkg/text/template/#hdr-Functions. That's why we don't document it here.
If you have further questions please feel free to re-open the issue.
Sorry, something went wrong.
@mattfarina Thank you!! It's all clear now. And thanks for the link to the docs, I did find that page but obviously missed/misunderstood that part.
No branches or pull requests
Hello, I spent some time understanding how to extract the element at index
n
of an ArrayEs:
I finally found the
index
function, but is not documented in the docs and I did't find it's declaration in the code.The usage is
and I found references in:
Where does it come from? Should be documented in the
list.md
doc file?I'm sorry if it's something obvious, I'm new to go and sprig. I can provide a PR to the documentation if you point me in the right direction.
Thank you!
The text was updated successfully, but these errors were encountered: