add some routes

This commit is contained in:
2026-09-03 18:48:23 +08:00
parent 3004676239
commit a1569590bc
18 changed files with 520697 additions and 7 deletions

View File

@@ -24,18 +24,23 @@ func main() {
moduleName := "bdgrp_go"
filepath.WalkDir("routes", func(path string, d os.DirEntry, err error) error {
if err != nil || !d.IsDir() || path == "routes" {
if err != nil || d.IsDir() {
return nil
}
entries, _ := os.ReadDir(path)
for _, e := range entries {
if !e.IsDir() && strings.HasSuffix(e.Name(), ".go") {
pkg := moduleName + "/" + filepath.ToSlash(path)
packages = append(packages, pkg)
break
if !strings.HasSuffix(d.Name(), ".go") {
return nil
}
pkg := moduleName + "/" + filepath.ToSlash(filepath.Dir(path))
for _, p := range packages {
if p == pkg {
return nil
}
}
packages = append(packages, pkg)
return nil
})