Add flag for testing embedded file system
This commit is contained in:
parent
316a94a6cf
commit
443a13afcf
3 changed files with 10 additions and 3 deletions
|
|
@ -16,7 +16,7 @@ import (
|
|||
//"strings"
|
||||
//"time"
|
||||
|
||||
//"github.com/Gleipnir-Technology/nidus-sync/config"
|
||||
"github.com/Gleipnir-Technology/nidus-sync/config"
|
||||
//"github.com/aarondl/opt/null"
|
||||
//"github.com/google/uuid"
|
||||
"github.com/rs/zerolog/log"
|
||||
|
|
@ -36,7 +36,7 @@ type templateSystemDisk struct {
|
|||
|
||||
func LoadTemplates() error {
|
||||
_, err := os.Stat("html/template")
|
||||
if err == nil {
|
||||
if err == nil && !config.IsProductionEnvironment() {
|
||||
templates = templateSystemDisk{
|
||||
sourceFS: os.DirFS("./html/template"),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue