JOJ3/internal/parser/debug/parser.go
张泊明518370910136 33d26be20c
All checks were successful
submodules sync / sync (push) Successful in 59s
build / build (push) Successful in 2m10s
build / trigger-build-image (push) Successful in 11s
chore(parser/debug): log in one line
2025-03-20 18:36:03 -04:00

34 lines
679 B
Go

package debug
import (
"log/slog"
"github.com/joint-online-judge/JOJ3/internal/stage"
)
func (*Debug) parse(executorResult stage.ExecutorResult, _ Conf) stage.ParserResult {
slog.Debug(
"debug parser",
"executorResult", executorResult,
"files", executorResult.Files,
)
return stage.ParserResult{
Score: 0,
Comment: "",
}
}
func (p *Debug) Run(results []stage.ExecutorResult, confAny any) (
[]stage.ParserResult, bool, error,
) {
conf, err := stage.DecodeConf[Conf](confAny)
if err != nil {
return nil, true, err
}
var res []stage.ParserResult
for _, result := range results {
res = append(res, p.parse(result, *conf))
}
return res, false, nil
}