diff --git a/main.go b/main.go index 15569e9..180834e 100644 --- a/main.go +++ b/main.go @@ -16,6 +16,8 @@ import ( "sync" "time" + "embed" + "github.com/BurntSushi/toml" ) @@ -60,12 +62,14 @@ type ProgressInfo struct { var templates *template.Template +var templateFS embed.FS + func init() { if err := os.MkdirAll(uploadDir, 0755); err != nil { fmt.Printf("Error creating upload directory: %v\n", err) } - templates = template.Must(template.ParseGlob("templates/*")) + templates = template.Must(template.ParseFS(templateFS, "templates/*")) } func main() {