Sorting tags (or params)

How does one sort Params, specifically tags, in a template? I’ve got the following code in my layouts/_default/entry.html file:

<p class="tags">tags: {{ range $i, $e := .Params.tags }}
    {{ if $i }} | {{ end }}
    <a href="{{ $baseurl }}/tags/{{ . | urlize }}">{{ . }}</a>
    {{ end }}</p>

As it stands now, my tags are displayed in whatever order they appear in the content file. It’d by nice to order them alphabetically. Is there some way to do .Params.tags.sorted or something similar? I’m not that familiar with Go or it’s templating.

Thanks.

In 0.13-DEV (the upcoming release) there is a new sort function:

https://github.com/spf13/hugo/blob/master/docs/content/templates/functions.md