updated dependencies and go

This commit is contained in:
2026-04-21 11:06:01 +02:00
parent f62e7499ec
commit 84b87d61f2
91 changed files with 551 additions and 637 deletions
+6 -5
View File
@@ -95,16 +95,17 @@ func _generateEnumSpecs(sourceDir string, destFile string, oldChecksum string, g
files = langext.ArrFilter(files, func(v os.DirEntry) bool { return !strings.HasSuffix(v.Name(), "_gen.go") })
langext.SortBy(files, func(v os.DirEntry) string { return v.Name() })
newChecksumStr := goext.GoextVersion
var newChecksumStr strings.Builder
newChecksumStr.WriteString(goext.GoextVersion)
for _, f := range files {
content, err := os.ReadFile(path.Join(sourceDir, f.Name()))
if err != nil {
return "", "", false, err
}
newChecksumStr += "\n" + f.Name() + "\t" + cryptext.BytesSha256(content)
newChecksumStr.WriteString("\n" + f.Name() + "\t" + cryptext.BytesSha256(content))
}
newChecksum := cryptext.BytesSha256([]byte(newChecksumStr))
newChecksum := cryptext.BytesSha256([]byte(newChecksumStr.String()))
if newChecksum != oldChecksum {
fmt.Printf("[EnumGenerate] Checksum has changed ( %s -> %s ), will generate new file\n\n", oldChecksum, newChecksum)
@@ -213,7 +214,7 @@ func processEnumFile(basedir string, fn string, debugOutput bool) ([]EnumDef, st
var descr *string = nil
var data *map[string]any = nil
if comment != nil {
comment = langext.Ptr(strings.TrimSpace(*comment))
comment = new(strings.TrimSpace(*comment))
if strings.HasPrefix(*comment, "{") {
if v, ok := tryParseDataComment(*comment); ok {
data = &v
@@ -278,7 +279,7 @@ func tryParseDataComment(s string) (map[string]any, bool) {
rv := reflect.ValueOf(v)
if rv.Kind() == reflect.Ptr && rv.IsNil() {
if rv.Kind() == reflect.Pointer && rv.IsNil() {
continue
}
if rv.Kind() == reflect.Bool {