all repos — homestead @ b49ce4ca82aab723265bc45fa0540ce5f4d6bf57

Code for my website

copy all files from kodata to output

Alan Pearce
commit

b49ce4ca82aab723265bc45fa0540ce5f4d6bf57

parent

d9a119ca0abe7ffedd125c81c78f725aab886d29

1 file changed, 10 insertions(+), 0 deletions(-)

changed files
M domain/content/builder/template/template.godomain/content/builder/template/template.go
@@ -4,6 +4,7 @@ import (
"bytes" "encoding/xml" "io" + "io/fs" "text/template" "github.com/PuerkitoBio/goquery"
@@ -85,6 +86,15 @@ return nil, fault.Wrap(err)
} return buf, nil +} + +func ListFiles() ([]fs.DirEntry, error) { + kodataStaticFiles, err := templates.Files.(fs.ReadDirFS).ReadDir(".") + if err != nil { + return nil, fault.Wrap(err, fmsg.With("could not read kodata static files")) + } + + return kodataStaticFiles, nil } func CopyFile(filename string, w io.Writer) error {