Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
{{ define "menu" }}
<a href="/">Homepage</a>
{{ if .user }}
<a href="/user/{{ .user.Username }}">Profile</a>
<a href="/logout">Logout</a>
{{ else }}
<a href="/login">Login</a>
<a href="/register">Register</a>
{{ end }}
{{ end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.