Split main file

Added code to split the generated main file into two separate files. This allows other code to launch the web application inline.
This commit is contained in:
NotZippy
2018-09-19 09:45:59 -07:00
parent 4d7a290247
commit 17459d14e6
6 changed files with 86 additions and 45 deletions

View File

@@ -71,7 +71,7 @@ func MustGenerateTemplate(filename, templateSource string, args map[string]inter
sourceCode := b.String()
filePath := filepath.Dir(filename)
if !DirExists(filePath) {
err = os.Mkdir(filePath, 0777)
err = os.MkdirAll(filePath, 0777)
if err != nil && !os.IsExist(err) {
Logger.Fatal("Failed to make directory","dir", filePath, "error", err)
}