mirror of
https://github.com/sablierapp/sablier.git
synced 2025-12-21 21:33:06 +01:00
* refactor: move app/theme to pkg/theme * refactor * wip * use dockerindocker * add providertest * wip * wip * test(docker): get state now uses dind container to test against a real provider * test(docker): move to docker_test package * refactor(docker): create container_inspect.go * test(docker): add more dind test * test(docker): event test now use docker in docker * refactor: remove unused instance type props * refactor test docker * fix instance list sort * stabilize test * remove testcontainers custom config
26 lines
548 B
Go
26 lines
548 B
Go
package theme
|
|
|
|
import (
|
|
"io/fs"
|
|
"log/slog"
|
|
"strings"
|
|
)
|
|
|
|
func (t *Themes) ParseTemplatesFS(f fs.FS) error {
|
|
err := fs.WalkDir(f, ".", func(path string, d fs.DirEntry, err error) error {
|
|
if strings.Contains(path, ".html") {
|
|
t.l.Info("theme found", slog.String("path", path))
|
|
_, err = t.themes.ParseFS(f, path)
|
|
if err != nil {
|
|
t.l.Info("cannot add theme", slog.String("path", path), slog.Any("reason", err))
|
|
return err
|
|
}
|
|
|
|
t.l.Info("successfully added theme", slog.String("path", path))
|
|
}
|
|
return err
|
|
})
|
|
|
|
return err
|
|
}
|