added index date to file page

This commit is contained in:
ston1th 2020-07-11 21:33:06 +02:00
commit 3f9b863171
5 changed files with 27 additions and 11 deletions

View file

@ -8,8 +8,9 @@ import (
)
const (
fileFmt = "20060102_150405"
logFmt = "2006/01/02 15:04:05: "
fileFmt = "20060102_150405"
logFmt = "2006/01/02 15:04:05: "
createdFmt = "02.01.2006 15:04:05"
)
var m sync.Mutex
@ -26,3 +27,7 @@ func FileName() string {
func LogTime() string {
return time.Now().Format(logFmt)
}
func CreatedTime(t time.Time) string {
return t.Format(createdFmt)
}