summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2018-03-30 07:21:27 +0800
committerGitHub <noreply@github.com>2018-03-30 07:21:27 +0800
commit45d1fc03cb043b585c81d15163184be7691f5fc8 (patch)
tree2a5c9b7c64301f7b72f09f223d885901d8de2811 /models
parent36ea53332d5b78bf9366262f5bb0765361e2ecc2 (diff)
downloadgitea-45d1fc03cb043b585c81d15163184be7691f5fc8.tar.gz
gitea-45d1fc03cb043b585c81d15163184be7691f5fc8.zip
fix go vet error (#3740)
Diffstat (limited to 'models')
-rw-r--r--models/git_diff_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/models/git_diff_test.go b/models/git_diff_test.go
index acdae2005e..a29830c7fa 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 <span class=\"added-code\">bar</span> 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 <span class=\"removed-code\">bar</span> 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))
}