Check error in GetRepoFileContent for io.ReadAll

This commit is contained in:
Mai-Lapyst 2024-03-15 23:49:13 +01:00
parent 1d3240887c
commit 781a37fbe1
No known key found for this signature in database
GPG key ID: F88D929C09E239F8

View file

@ -87,7 +87,10 @@ func ProcessorHelper() *markup.ProcessorHelper {
} }
defer dataRc.Close() defer dataRc.Close()
buf, _ := io.ReadAll(dataRc) buf, err := io.ReadAll(dataRc)
if err != nil {
log.Error("failed to completly read blob for %-v:%s. Error: %v", repo, filePath, err)
}
fileContent, _, err := highlight.File(blob.Name(), language, buf) fileContent, _, err := highlight.File(blob.Name(), language, buf)
if err != nil { if err != nil {