Skip to content

Commit 6c5dfac

Browse files
committed
gofmt updated files
1 parent 7c96dfb commit 6c5dfac

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
@@ -84,7 +84,7 @@ func NewCaseDescription(input, output config.IoFile, timeLimit float64) *CaseDes
8484
OutputFile: output.Path,
8585
WorkFile: workFilePath,
8686
CustomCase: input.Custom,
87-
TimeLimit: timeLimit,
87+
TimeLimit: timeLimit,
8888
}
8989
}
9090

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

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

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

239238
status, err := timedExecution(cmd, desc.TimeLimit)
240239
if status == TO {
241-
return CaseStatus{
240+
return CaseStatus{
242241
Status: TL,
243242
CheckerError: nil,
244243
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)