From 6c6d1ff08cc254315e77607d8a0b8e4c706d302d Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 31 Mar 2018 04:28:10 +0800 Subject: [PATCH] fix go vet error (#3740) (#3744) --- models/git_diff_test.go | 16 ++++++++-------- routers/repo/issue_label_test.go | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/models/git_diff_test.go b/models/git_diff_test.go index acdae2005..a29830c7f 100644 --- a/models/git_diff_test.go +++ b/models/git_diff_test.go @@ -21,16 +21,16 @@ func assertLineEqual(t *testing.T, d1 *DiffLine, d2 *DiffLine) { func TestDiffToHTML(t *testing.T) { assertEqual(t, "+foo bar biz", diffToHTML([]dmp.Diff{ - {dmp.DiffEqual, "foo "}, - {dmp.DiffInsert, "bar"}, - {dmp.DiffDelete, " baz"}, - {dmp.DiffEqual, " biz"}, + {Type: dmp.DiffEqual, Text: "foo "}, + {Type: dmp.DiffInsert, Text: "bar"}, + {Type: dmp.DiffDelete, Text: " baz"}, + {Type: dmp.DiffEqual, Text: " biz"}, }, DiffLineAdd)) assertEqual(t, "-foo bar biz", diffToHTML([]dmp.Diff{ - {dmp.DiffEqual, "foo "}, - {dmp.DiffDelete, "bar"}, - {dmp.DiffInsert, " baz"}, - {dmp.DiffEqual, " biz"}, + {Type: dmp.DiffEqual, Text: "foo "}, + {Type: dmp.DiffDelete, Text: "bar"}, + {Type: dmp.DiffInsert, Text: " baz"}, + {Type: dmp.DiffEqual, Text: " biz"}, }, DiffLineDel)) } diff --git a/routers/repo/issue_label_test.go b/routers/repo/issue_label_test.go index 9052a65d2..bf6251125 100644 --- a/routers/repo/issue_label_test.go +++ b/routers/repo/issue_label_test.go @@ -32,7 +32,7 @@ func TestInitializeLabels(t *testing.T) { ctx := test.MockContext(t, "user2/repo1/labels/initialize") test.LoadUser(t, ctx, 2) test.LoadRepo(t, ctx, 2) - InitializeLabels(ctx, auth.InitializeLabelsForm{"Default"}) + InitializeLabels(ctx, auth.InitializeLabelsForm{TemplateName: "Default"}) assert.EqualValues(t, http.StatusFound, ctx.Resp.Status()) models.AssertExistsAndLoadBean(t, &models.Label{ RepoID: 2,