files/login.tmpl.html
{{ define "login" }} {{ template "head" . }} {{ template "nav" . }} <p>login: <form method="POST" action="/login"> <label for="username">username:</label> <input type="text" name="username" required> <br> <label for="password">password:</label> <input type="password" name="password" required> <br> <input type="submit" value="login"> </form> <p>register: <form method="POST" action="/register"> <label for="username">username:</label> <input type="text" name="username" required> <br> <label for="password">password:</label> <input type="password" name="password" required> <br> <input type="submit" value="register"> </form> {{ template "tail" . }} {{ end }}