mirror of
https://github.com/nxshock/promodj.git
synced 2025-07-01 23:53:35 +05:00
Split site to separate files
This commit is contained in:
parent
a0e0b7b1cc
commit
b0f9ea1f49
7 changed files with 108 additions and 10 deletions
8
main.go
8
main.go
|
@ -1,19 +1,13 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"html/template"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
_ "embed"
|
||||
)
|
||||
|
||||
//go:embed templates/genres.html
|
||||
var templateBytes embed.FS
|
||||
|
||||
var templates *template.Template
|
||||
|
||||
func init() {
|
||||
|
@ -45,7 +39,7 @@ func init() {
|
|||
func initTepmplates() error {
|
||||
var err error
|
||||
|
||||
templates, err = template.ParseFS(templateBytes, "templates/*.html")
|
||||
templates, err = template.ParseFS(siteFS, "site/*.htm")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue