This commit is contained in:
2023-06-07 12:39:21 +02:00
parent fe9ebf0bab
commit 8affa81bb9
2 changed files with 9 additions and 3 deletions

View File

@@ -10,6 +10,7 @@ import (
"gogs.mikescher.com/BlackForestBytes/goext/rext"
"io"
"os"
"path"
"regexp"
"strings"
"time"
@@ -54,8 +55,10 @@ func GenerateEnumSpecs(sourceDir string, destFile string) error {
}
}
newChecksumStr := goext.GoextVersion
langext.ArrFilter(files, func(v os.DirEntry) bool { return v.Name() != path.Base(destFile) })
langext.SortBy(files, func(v os.DirEntry) string { return v.Name() })
newChecksumStr := goext.GoextVersion
for _, f := range files {
content, err := os.ReadFile(destFile)
if err != nil {
@@ -81,6 +84,9 @@ func GenerateEnumSpecs(sourceDir string, destFile string) error {
if !strings.HasSuffix(f.Name(), ".go") {
continue
}
if f.Name() == path.Base(destFile) {
continue
}
fmt.Printf("========= %s =========\n\n", f.Name())
fileEnums, pn, err := processFile(f.Name())