21 lines
341 B
Go
Raw Normal View History

2020-11-06 12:21:47 +01:00
package wireguard
import (
"embed"
"strings"
"text/template"
)
//go:embed tpl/*
var Templates embed.FS
2020-11-09 20:26:34 +01: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)
}
}