Skip to content

Commit bf0c2f9

Browse files
committed
gofmt updated files
1 parent 4bbe94c commit bf0c2f9

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

commands/run.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func NewCaseDescription(input, output config.IoFile, timeLimit float64) *CaseDes
8383
OutputFile: output.Path,
8484
WorkFile: workFilePath,
8585
CustomCase: input.Custom,
86-
TimeLimit: timeLimit,
86+
TimeLimit: timeLimit,
8787
}
8888
}
8989

@@ -191,15 +191,14 @@ func newJudgeReport() JudgeReport {
191191
return &ConsoleJudgeReport{Stats: []CaseStatus{}}
192192
}
193193

194-
195194
func timedExecution(cmd *exec.Cmd, timeOut float64) (int8, error) {
196195
cmd.Start()
197196
done := make(chan error)
198197
go func() { done <- cmd.Wait() }()
199198

200199
timeout := time.After(time.Duration(timeOut) * time.Millisecond)
201200
select {
202-
case <- timeout:
201+
case <-timeout:
203202
cmd.Process.Kill()
204203
return TO, nil
205204
case err := <-done:
@@ -237,7 +236,7 @@ func execute(judge Judge, desc CaseDescription, command string, args ...string)
237236

238237
status, err := timedExecution(cmd, desc.TimeLimit)
239238
if status == TO {
240-
return CaseStatus{
239+
return CaseStatus{
241240
Status: TL,
242241
CheckerError: nil,
243242
Stderr: stderrBuffer.String(),

config/meta.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ func (ioFile *IoFile) GetId() int {
4040
// so an update to it (either from the outside, or by invoking egor commands) can change
4141
// the behavior of execution of the egor cli.
4242
type EgorMeta struct {
43-
TaskName string
44-
TaskLang string
45-
Inputs []IoFile
46-
Outputs []IoFile
47-
TaskFile string
43+
TaskName string
44+
TaskLang string
45+
Inputs []IoFile
46+
Outputs []IoFile
47+
TaskFile string
4848
TimeLimit float64
4949
}
5050

@@ -76,11 +76,11 @@ func NewEgorMeta(task Task, config Config) EgorMeta {
7676
panic(err)
7777
}
7878
return EgorMeta{
79-
TaskName: task.Name,
80-
TaskLang: config.Lang.Default,
81-
Inputs: inputs,
82-
Outputs: outputs,
83-
TaskFile: taskFile,
79+
TaskName: task.Name,
80+
TaskLang: config.Lang.Default,
81+
Inputs: inputs,
82+
Outputs: outputs,
83+
TaskFile: taskFile,
8484
TimeLimit: task.TimeLimit,
8585
}
8686
}

0 commit comments

Comments
 (0)