fix(parser/resultdetail): file format
All checks were successful
build / build (push) Successful in 1m3s
build / trigger-build-image (push) Successful in 7s

This commit is contained in:
张泊明518370910136 2024-10-12 17:34:26 -04:00
parent 5f63301656
commit 7004c5368e
GPG Key ID: D47306D7062CDA9D

View File

@ -47,9 +47,9 @@ func (*ResultDetail) Run(results []stage.ExecutorResult, confAny any) (
} }
for _, file := range conf.ShowFiles { for _, file := range conf.ShowFiles {
content, ok := result.Files[file] content, ok := result.Files[file]
comment += fmt.Sprintf("File: `%s`.\n", file) comment += fmt.Sprintf("File: `%s`:\n", file)
if ok { if ok {
comment += fmt.Sprintf("```%s\n```\n", content) comment += fmt.Sprintf("```\n%s\n```\n", content)
} else { } else {
comment += "Not found.\n" comment += "Not found.\n"
} }