mirror of
https://github.com/nxshock/promodj.git
synced 2024-11-28 03:11:01 +05:00
25 lines
327 B
Go
25 lines
327 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"embed"
|
||
|
"html/template"
|
||
|
)
|
||
|
|
||
|
var templates *template.Template
|
||
|
|
||
|
//go:embed templates/*.htm
|
||
|
var templatesFS embed.FS
|
||
|
|
||
|
func initTepmplates() error {
|
||
|
var err error
|
||
|
|
||
|
templates, err = template.ParseFS(templatesFS, "templates/*.htm")
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
templatesFS = embed.FS{}
|
||
|
|
||
|
return nil
|
||
|
}
|