node build fixed

This commit is contained in:
ra_ma
2025-09-20 14:08:38 +01:00
parent c6ebbe069d
commit 3d298fa434
1516 changed files with 535727 additions and 2 deletions

View File

@@ -0,0 +1,34 @@
package codegen
import (
"encoding/json"
"os"
)
func LoadHandlers(path string) []*RouteHandler {
var handlers []*RouteHandler
docsContent, err := os.ReadFile(path)
if err != nil {
panic(err)
}
err = json.Unmarshal(docsContent, &handlers)
if err != nil {
panic(err)
}
return handlers
}
func LoadPublicStructs(path string) []*GoStruct {
var goStructs []*GoStruct
structsContent, err := os.ReadFile(path)
if err != nil {
panic(err)
}
err = json.Unmarshal(structsContent, &goStructs)
if err != nil {
panic(err)
}
return goStructs
}