chore: FileName -> Filename
This commit is contained in:
parent
e34cba9b17
commit
498fcf2cdf
|
@ -15,7 +15,7 @@ type Conf struct {
|
|||
Cases []struct {
|
||||
Outputs []struct {
|
||||
Score int
|
||||
FileName string
|
||||
Filename string
|
||||
AnswerPath string
|
||||
CompareSpace bool
|
||||
AlwaysHide bool
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"`
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user