func (e EntriesByDate) Swap(i, j int) {
	e[i], e[j] = e[j], e[i]
}
Swap switches the elemens at i and j.
package main
import (
	"fmt"
	"sort"
	"time"
)
func GetEntriesByDate(entries []*Entry) EntriesByDate {
	es := make(EntriesByDate, 0, len(entries))
	for _, e := range entries {
		es = append(es, e)
	}
	sort.Sort(es)
	return es
}
type EntriesByDate []*Entry
func (e EntriesByDate) Len() int {
	return len(e)
}
func (e EntriesByDate) Less(i, j int) bool {
	return e[i].Created.After(e[j].Created)
}