gocustomurls/embed.go

20 lines
336 B
Go
Raw Normal View History

2024-05-06 07:20:30 +00:00
package main
import (
"embed"
"html/template"
)
// go:embed templates/*
var tmpls embed.FS
func GetServeHtml() *template.Template {
data, _ := tmpls.ReadFile("success.html")
return template.Must(template.New("main").Parse(string(data)))
}
func GetDefaultHtml() []byte {
data, _ := tmpls.ReadFile("default.html")
return data
}