Run gofmt on templates.go
This commit is contained in:
parent
5265bb6a25
commit
7fba4182e1
1 changed files with 3 additions and 2 deletions
|
@ -16,9 +16,10 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/Masterminds/sprig/v3"
|
||||
"sort"
|
||||
"text/template"
|
||||
|
||||
"github.com/Masterminds/sprig/v3"
|
||||
)
|
||||
|
||||
type postsSort []*post
|
||||
|
@ -42,7 +43,7 @@ func mustParseTmpl(name, value string) *template.Template {
|
|||
}
|
||||
|
||||
func defineFuncMap() template.FuncMap {
|
||||
fm := sprig.TxtFuncMap()
|
||||
fm := sprig.TxtFuncMap()
|
||||
// sorts posts by date, newest posts go first
|
||||
fm["sortPosts"] = func(posts []*post) []*post {
|
||||
// sortPosts is most likely to be used in a pipeline, and the
|
||||
|
|
Loading…
Reference in a new issue