refac: rethought the complete workflow and deployement flow ; docs etc.
This commit is contained in:
1 parent
4a6209a8db
commit
09bd5afa4a
26 files changed
+800
-334
No files matched your search
@@ -1,6 +0,0 @@
|
||||
package assets
|
||||
|
||||
import "embed"
|
||||
|
||||
//go:embed all:dist
|
||||
var DistEmbed embed.FS
|
||||
@@ -0,0 +1,21 @@
|
||||
//go:build !nofrontend
|
||||
|
||||
package assets
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
)
|
||||
|
||||
//go:embed all:dist
|
||||
var distEmbed embed.FS
|
||||
|
||||
var Dist = mustSub(distEmbed, "dist")
|
||||
|
||||
func mustSub(fsys fs.FS, dir string) fs.FS {
|
||||
sub, err := fs.Sub(fsys, dir)
|
||||
if err != nil {
|
||||
panic("assets: " + err.Error())
|
||||
}
|
||||
return sub
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
//go:build nofrontend
|
||||
|
||||
package assets
|
||||
|
||||
import "io/fs"
|
||||
|
||||
var Dist fs.FS
|
||||
@@ -29,7 +29,7 @@ func (m MailRepository) Send(receiverAddress string, templateName string, data a
|
||||
|
||||
d := gomail.NewDialer(smtpHost, smtpPort, from, password)
|
||||
|
||||
tmpl, err := template.ParseFS(mailTemplateFiles, "mail/templates/"+templateName+".html")
|
||||
tmpl, err := template.ParseFS(mailTemplateFiles, "templates/"+templateName+".html")
|
||||
if err != nil {
|
||||
log.Println("error when template.ParseFS:", err)
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user