style: function order
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval

This commit is contained in:
Simon Vieille 2025-08-30 00:31:51 +02:00
commit f73222a1c9
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -15,21 +15,6 @@ var (
entrypoints map[string]map[string]map[string][]string
)
func Asset(name string) string {
if manifest == nil {
value, _ := statics.ReadFile("static/manifest.json")
json.Unmarshal(value, &manifest)
}
path, ok := manifest[name]
if !ok {
return ""
}
return path
}
func entrypointFiles(app, category string) []string {
if entrypoints == nil {
value, _ := statics.ReadFile("static/entrypoints.json")
@ -51,6 +36,21 @@ func entrypointFiles(app, category string) []string {
return files
}
func Asset(name string) string {
if manifest == nil {
value, _ := statics.ReadFile("static/manifest.json")
json.Unmarshal(value, &manifest)
}
path, ok := manifest[name]
if !ok {
return ""
}
return path
}
func EntrypointJs(app string) []Node {
files := entrypointFiles(app, "js")
var results []Node