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
+5 -4
View File
@@ -5,11 +5,11 @@ import (
_ "embed"
"errors"
"fmt"
"go/format"
"git.blackforestbytes.com/BlackForestBytes/goext"
"git.blackforestbytes.com/BlackForestBytes/goext/cryptext"
"git.blackforestbytes.com/BlackForestBytes/goext/langext"
"git.blackforestbytes.com/BlackForestBytes/goext/rext"
"go/format"
"io"
"os"
"path"
@@ -63,16 +63,17 @@ func GenerateIDSpecs(sourceDir string, destFile string, opt IDGenOptions) error
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 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("[IDGenerate] Checksum has changed ( %s -> %s ), will generate new file\n\n", oldChecksum, newChecksum)