mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-03 20:36:07 +01:00 
			
		
		
		
	fix go vet error (#3740)
This commit is contained in:
		@@ -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))
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user