flottbot icon indicating copy to clipboard operation
flottbot copied to clipboard

Helper functions for templating

Open JordanSussman opened this issue 7 years ago • 1 comments

Shortcuts for common more verbose go templates.

ability: |-
        {{ range .abilities }}
          - {{ .ability.name -}}
        {{ end }}

vs

ability: .abilities[*].ability.name

JordanSussman avatar Aug 31 '18 20:08 JordanSussman

That example is probably not great, but maybe consider adding support for https://github.com/PaesslerAG/jsonpath so you don't have to fiddle with Go templates for pulling out nested values

wass3r avatar Sep 12 '18 16:09 wass3r