Compare commits
No commits in common. "b9c0bd863b48f790a51d5764b3e91e66f9f00378" and "e3253e6434e627ddadc4dc38f488e2891c29f48c" have entirely different histories.
b9c0bd863b
...
e3253e6434
|
@ -40,14 +40,12 @@ func Initialise(a *config.AppConfig) {
|
|||
// time the related template was generated
|
||||
func makeBasicTemplateData(name string) models.TemplateData {
|
||||
var strMap map[string]string
|
||||
if cacheItem, ok := app.TemplateCache.Cache[name]; ok {
|
||||
if _, ok := app.TemplateCache.Cache[name]; ok {
|
||||
strMap = map[string]string{
|
||||
"GeneratedAt": cacheItem.GeneratedAt.Format(time.UnixDate),
|
||||
"GeneratedAt": app.TemplateCache.Cache[name].GeneratedAt.Format(time.UnixDate),
|
||||
}
|
||||
} else {
|
||||
strMap = map[string]string{
|
||||
"GeneratedAt": time.Now().Format(time.UnixDate),
|
||||
}
|
||||
strMap = make(map[string]string)
|
||||
}
|
||||
|
||||
templateData := models.TemplateData{
|
||||
|
|
Loading…
Reference in a new issue