My template looks like this currently:
{{range .Users}}
<div ...>
<div class="row XXXX">
</div>
{{end}}
The XXX has to be replaced with a css-class that is based on a property of the User struct, UserLevel which is a string.
So depending on the value of UserLevel, I will display the correct css class:
UserLevel is "beg" then I need to output "beginner". UserLevel is "int" then I need to output "intermediate" etc.
I know I can just rename the css class to match the value of the property, but I don't want to keep a tight coupling between the 2.
Is this possible to do somehow since expressions are not allowed in if statements?