diff options
Diffstat (limited to 'replacer.go')
-rw-r--r-- | replacer.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/replacer.go b/replacer.go index d1c58e8..4ff578c 100644 --- a/replacer.go +++ b/replacer.go @@ -19,6 +19,7 @@ import ( "os" "path/filepath" "runtime" + "strconv" "strings" "time" ) @@ -236,6 +237,8 @@ func globalDefaultReplacements(key string) (string, bool) { return runtime.GOARCH, true case "time.now.common_log": return nowFunc().Format("02/Jan/2006:15:04:05 -0700"), true + case "time.now.year": + return strconv.Itoa(nowFunc().Year()), true } return "", false |