I have a template and I would like to evaluate various fields using the text/template package. I have a hard to time to figure it out how the evaluation should work because the code below seems to fail. Is the template package powerful enough to handle this kind of evaluations?
type something struct{
Brand string
}
tpl := `{{if .Brand == "Coke"}} It's a coke{{else}} It's something else{{end}}`