From 9188fc2d615d7c7315cede8d92718e64b956b918 Mon Sep 17 00:00:00 2001 From: Leo Lu Date: Sat, 27 Feb 2021 12:57:43 +0800 Subject: [PATCH] Fix according to golang/go#44614 --- app/controller/submission_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controller/submission_test.go b/app/controller/submission_test.go index 0c998221..78c93cc5 100644 --- a/app/controller/submission_test.go +++ b/app/controller/submission_test.go @@ -23,7 +23,7 @@ const ( submitter ) -func createSubmissionForTest(t *testing.T, name string, id int, problem *models.Problem, user *models.User, code *fileContent, testCaseCount int) (submission models.Submission) { +func createSubmissionForTest(t *testing.T, name string, id int, problem *models.Problem, user *models.User, code *fileContent, testCaseCount int) models.Submission { for i := 0; i < testCaseCount; i++ { createTestCaseForTest(t, *problem, testCaseData{ Score: 0, @@ -33,7 +33,7 @@ func createSubmissionForTest(t *testing.T, name string, id int, problem *models. }) } problem.LoadTestCases() - submission = models.Submission{ + submission := models.Submission{ UserID: user.ID, User: user, ProblemID: problem.ID, @@ -72,7 +72,7 @@ func createSubmissionForTest(t *testing.T, name string, id int, problem *models. _, err = code.reader.Seek(0, io.SeekStart) assert.NoError(t, err) } - return + return submission } func TestCreateSubmission(t *testing.T) {