func ExecBatch(pid int, rawcode string, lang string) []Bridge.TestCaseStatus { testcase := Testcases{} testcase.Pid = pid testcases, count := testcase.GetAllByPid() j := Bridge.TestCaseStatus{} j.Comment = "Internal Error" j.Success = false if count == 0 { return []Bridge.TestCaseStatus{j} } code := Bridge.Code{} code.Lang = lang cr := Bridge.CRManager{} cr.RawCode = &rawcode cr.Program = &code cr.Isbatch = true testInput := make([]string, count) testOutput := make([]string, count) for i, test := range testcases { testInput[i] = test.Input testOutput[i] = test.Output } cr.TestInput = testInput cr.TestOutput = testOutput Bridge.CompileExec(&cr) return cr.TestCaseOutput }