fix article file id to be 64 bit wide
Signed-off-by: Tobias Erbshäußer <tobias@tesoft.dev>
This commit is contained in:
+3
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user