|
|
|
|
175
|
if UseStaticTemplateBundleFile == true {
|
175
|
if UseStaticTemplateBundleFile == true {
|
176
|
err := t.RestoreTemplateBundleFromDisk()
|
176
|
err := t.RestoreTemplateBundleFromDisk()
|
177
|
if err != nil {
|
177
|
if err != nil {
|
178
|
- log.Println("Failed to restore template bundle from disk, opting for standard operating procedure instead. Error: ", err)
|
|
|
|
|
178
|
+ log.Println("Detected initial run. Will generate a template bundle file.")
|
179
|
} else {
|
179
|
} else {
|
180
|
return
|
180
|
return
|
181
|
}
|
181
|
}
|
|
|
|
|
203
|
func (t *TemplateSet) GatherCogTemplates(cogTemplatePath string, prefixName string, templateFileExtension string) {
|
203
|
func (t *TemplateSet) GatherCogTemplates(cogTemplatePath string, prefixName string, templateFileExtension string) {
|
204
|
|
204
|
|
205
|
if UseStaticTemplateBundleFile == true {
|
205
|
if UseStaticTemplateBundleFile == true {
|
206
|
- return
|
|
|
|
|
206
|
+ if _, err := os.Stat(StaticTemplateBundleFilePath); os.IsNotExist(err) {
|
|
|
207
|
+ log.Println("Detected initial run. Will generate a template bundle file.")
|
|
|
208
|
+ } else {
|
|
|
209
|
+ return
|
|
|
210
|
+ }
|
207
|
}
|
211
|
}
|
208
|
|
212
|
|
209
|
bundle := NewTemplateBundle()
|
213
|
bundle := NewTemplateBundle()
|