29 lines
524 B
Go
29 lines
524 B
Go
package shelves
|
|
|
|
import (
|
|
"embed"
|
|
"fmt"
|
|
"io/fs"
|
|
)
|
|
|
|
//go:embed frontend/*
|
|
var fe embed.FS
|
|
|
|
var Frontend, _ = fs.Sub(fe, "frontend")
|
|
|
|
//go:embed internal/templates/views/*.tmpl.* internal/templates/components/*.tmpl.*
|
|
var templates embed.FS
|
|
var Templates, _ = fs.Sub(templates, "internal/templates")
|
|
|
|
func printEmbeddedFiles(efs fs.FS) error {
|
|
return fs.WalkDir(efs, ".", func(path string, d fs.DirEntry, err error) error {
|
|
if err != nil {
|
|
return err
|
|
}
|
|
if !d.IsDir() {
|
|
fmt.Println(path)
|
|
}
|
|
return nil
|
|
})
|
|
}
|