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:
parent
ee316987bb
commit
7b45c9abbc
@ -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)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user