HTML

HTML

This way to call a function from a Go template can be used for many purposes. This is only one tiny example how it works. It may be possible to calculate values etc.

1. Write the HTML and call the function "trans" with parameters

<ul id="sublist">
    <li id="home"><a href="/home">{{trans "Home"}}</a></li>
    <li id="po"><a href="/po">{{trans "Create PO-files"}}</a></li>
    <li id="go"><a href="/go">{{trans "Go Code"}}</a></li>
    <li id="html"><a href="/html">{{trans "HTML"}}</a></li>
    <li id="gwd"><a href="https://go4webdev.org">go4webdev</a></li>
</ul>