Compare commits
2 commits
e3253e6434
...
b9c0bd863b
Author | SHA1 | Date | |
---|---|---|---|
Lilian Jónsdóttir | b9c0bd863b | ||
Lilian Jónsdóttir | 6b1205e4f3 |
|
@ -40,12 +40,14 @@ func Initialise(a *config.AppConfig) {
|
||||||
// time the related template was generated
|
// time the related template was generated
|
||||||
func makeBasicTemplateData(name string) models.TemplateData {
|
func makeBasicTemplateData(name string) models.TemplateData {
|
||||||
var strMap map[string]string
|
var strMap map[string]string
|
||||||
if _, ok := app.TemplateCache.Cache[name]; ok {
|
if cacheItem, ok := app.TemplateCache.Cache[name]; ok {
|
||||||
strMap = map[string]string{
|
strMap = map[string]string{
|
||||||
"GeneratedAt": app.TemplateCache.Cache[name].GeneratedAt.Format(time.UnixDate),
|
"GeneratedAt": cacheItem.GeneratedAt.Format(time.UnixDate),
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
strMap = make(map[string]string)
|
strMap = map[string]string{
|
||||||
|
"GeneratedAt": time.Now().Format(time.UnixDate),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
templateData := models.TemplateData{
|
templateData := models.TemplateData{
|
||||||
|
|
Loading…
Reference in a new issue