chore: FileName -> Filename
All checks were successful
submodules sync / sync (push) Successful in 39s
build / build (push) Successful in 1m31s
build / trigger-build-image (push) Successful in 8s

This commit is contained in:
张泊明518370910136 2025-06-21 13:14:48 -04:00
parent e34cba9b17
commit 498fcf2cdf
GPG Key ID: D47306D7062CDA9D
4 changed files with 6 additions and 6 deletions

View File

@ -15,7 +15,7 @@ type Conf struct {
Cases []struct {
Outputs []struct {
Score int
FileName string
Filename string
AnswerPath string
CompareSpace bool
AlwaysHide bool

View File

@ -40,7 +40,7 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) (
return nil, true, err
}
answerStr := string(answer)
resultStr := result.Files[output.FileName]
resultStr := result.Files[output.Filename]
isSame := stringsEqual(
answerStr,
resultStr,
@ -48,7 +48,7 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) (
)
slog.Debug(
"compare",
"filename", output.FileName,
"filename", output.Filename,
"answerPath", output.AnswerPath,
"actualLength", len(resultStr),
"answerLength", len(answerStr),
@ -65,7 +65,7 @@ func (*Diff) Run(results []stage.ExecutorResult, confAny any) (
}
comment += conf.FailComment + "\n"
comment += fmt.Sprintf("Difference found in `%s`\n",
output.FileName)
output.Filename)
if !output.AlwaysHide {
if output.MaxDiffLength == 0 { // real default value
output.MaxDiffLength = 2048

View File

@ -7,7 +7,7 @@ import "github.com/joint-online-judge/JOJ3/internal/stage"
var name = "log"
type Conf struct {
FileName string `default:"stdout"`
Filename string `default:"stdout"`
Msg string `default:"log msg"`
Level int `default:"0"`
}

View File

@ -10,7 +10,7 @@ import (
)
func (*Log) parse(executorResult stage.ExecutorResult, conf Conf) stage.ParserResult {
content := executorResult.Files[conf.FileName]
content := executorResult.Files[conf.Filename]
var data map[string]any
err := json.Unmarshal([]byte(content), &data)
if err != nil {