refactor: switch to templ for HTML templates
1 file changed, 6 insertions(+), 6 deletions(-)
changed files
M frontend/assets.go → frontend/assets.go
@@ -12,8 +12,8 @@ "github.com/pkg/errors" ) var Assets = &AssetCollection{ - Scripts: make(map[string]*Asset), - Stylesheets: make(map[string]*Asset), + Scripts: []*Asset{}, + Stylesheets: []*Asset{}, ByPath: make(map[string]*Asset), }@@ -25,8 +25,8 @@ Base64SHA256 string } type AssetCollection struct { - Scripts map[string]*Asset - Stylesheets map[string]*Asset + Scripts []*Asset + Stylesheets []*Asset ByPath map[string]*Asset }@@ -61,7 +61,7 @@ asset, err := newAsset(filename) if err != nil { return err } - Assets.Scripts[filename] = asset + Assets.Scripts = append(Assets.Scripts, asset) Assets.ByPath[asset.URL] = asset }@@ -78,7 +78,7 @@ asset, err := newAsset(filename) if err != nil { return err } - Assets.Stylesheets[filename] = asset + Assets.Stylesheets = append(Assets.Stylesheets, asset) Assets.ByPath[asset.URL] = asset }