Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{{ define "menu" }}
<div>
GoBlog
<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 }}
</div>
{{ 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.