css class based on loaded template
问题 I've got this bootstrap nav in my _base.html template like this: <ul class="nav navbar-nav"> <li><a href="/" class="">Home</a></li> <li><a href="/blog/">Blog</a></li> </ul> Using Golang I want to add a class="active" to the corresponding list-item. I've read the html/template docs and articles like thisone, but it appears to me that I have to write a golang function that adds class="active" to every correspondending corresponding list-item. But somehow still I think it would be cleaner if I