Use go:embed for statics ()

This commit is contained in:
Antonio Navarro Perez 2021-11-21 18:31:47 +01:00 committed by GitHub
parent ddda39b22a
commit 1d769673ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 76 deletions

View file

@ -22,7 +22,7 @@ func NewHandler(path string) *Handler {
}
func (c *Handler) createFromTemplateFile() ([]byte, error) {
t, err := distribyted.HttpFS.Open("/templates/config_template.yaml")
t, err := distribyted.Templates.Open("templates/config_template.yaml")
if err != nil {
return nil, err
}