fix article file id to be 64 bit wide

Signed-off-by: Tobias Erbshäußer <tobias@tesoft.dev>
This commit is contained in:
2026-05-24 09:22:27 +02:00
parent 96160d5002
commit d80c218945
+3 -3
View File
@@ -37,7 +37,7 @@ type Article struct {
}
type ArticleFile struct {
Id int
Id int64
Data []byte
}
@@ -66,7 +66,7 @@ func ParseArticle(reader io.Reader, filePrefix string) (*Article, error) {
}
usedFiles := make(map[string]ArticleFile)
nextFileId := 0
nextFileId := int64(0)
pc, html, err := md.Parse(func(path string) (string, error) {
content, ok := tarFiles[strings.TrimPrefix(path, "./")]
@@ -77,7 +77,7 @@ func ParseArticle(reader io.Reader, filePrefix string) (*Article, error) {
usedFiles[path] = ArticleFile{nextFileId, content}
nextFileId++
return filePrefix + strconv.Itoa(nextFileId), nil
return filePrefix + strconv.FormatInt(nextFileId, 10), nil
}, readmeBytes)
if err != nil {
return nil, err