1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

style: simplified time template func

This commit is contained in:
Carlos Alexandro Becker 2018-04-03 20:55:29 -03:00
parent ee316987bb
commit 7b45c9abbc
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -8,10 +8,6 @@ import (
"github.com/goreleaser/goreleaser/context"
)
var (
timeNow = time.Now
)
func releaseTitle(ctx *context.Context) (string, error) {
var out bytes.Buffer
t, err := template.New("github").
@ -34,7 +30,7 @@ func releaseTitle(ctx *context.Context) (string, error) {
func mkFuncMap() template.FuncMap {
return template.FuncMap{
"time": func(s string) string {
return timeNow().Format(s)
return time.Now().Format(s)
},
}
}