Skip to content

How i can add regex filter in if construction? #4023

Answered by caarlos0
jidckii asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, there is no filter function, but in this case you can simply check if .Prerelease field is set, e.g.:

folder: '{{- if .IsNightly }}nightly/{{.Version}}{{- else if .PreRelease }}beta/{{.Version}}{{else}}{{.Version}}{{- end }}'

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@caarlos0
Comment options

@caarlos0
Comment options

Answer selected by jidckii
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants