Skip to content

Multiple conditions in template logic #5290

Discussion options

You must be logged in to vote
template = "{{ if and (ne \"Charging\" .State.String) (not .Error) }} {{ .Percentage }} {{ end }}"

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Schweber
Comment options

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