2020-11-06 06:21:47 -05:00
|
|
|
package wireguard
|
|
|
|
|
2021-04-03 16:38:22 -04:00
|
|
|
import (
|
|
|
|
"embed"
|
|
|
|
"html/template"
|
|
|
|
"strings"
|
|
|
|
)
|
2020-11-16 16:39:41 -05:00
|
|
|
|
2021-04-03 16:38:22 -04:00
|
|
|
//go:embed tpl/*
|
|
|
|
var Templates embed.FS
|
2020-11-09 14:26:34 -05:00
|
|
|
|
2021-04-03 16:38:22 -04:00
|
|
|
var templateCache *template.Template
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
var err error
|
|
|
|
templateCache, err = template.New("server").Funcs(template.FuncMap{"StringsJoin": strings.Join}).ParseFS(Templates, "tpl/*.tpl")
|
|
|
|
if err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
}
|