mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-21 14:51:00 +01:00
fix gofmt error
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
d0490c187c
commit
6510e57758
7 changed files with 27 additions and 28 deletions
|
@ -20,16 +20,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.Diff{dmp.DiffEqual, "foo "},
|
||||
dmp.Diff{dmp.DiffInsert, "bar"},
|
||||
dmp.Diff{dmp.DiffDelete, " baz"},
|
||||
dmp.Diff{dmp.DiffEqual, " biz"},
|
||||
{dmp.DiffEqual, "foo "},
|
||||
{dmp.DiffInsert, "bar"},
|
||||
{dmp.DiffDelete, " baz"},
|
||||
{dmp.DiffEqual, " biz"},
|
||||
}, DiffLineAdd))
|
||||
|
||||
assertEqual(t, "-foo <span class=\"removed-code\">bar</span> biz", diffToHTML([]dmp.Diff{
|
||||
dmp.Diff{dmp.DiffEqual, "foo "},
|
||||
dmp.Diff{dmp.DiffDelete, "bar"},
|
||||
dmp.Diff{dmp.DiffInsert, " baz"},
|
||||
dmp.Diff{dmp.DiffEqual, " biz"},
|
||||
{dmp.DiffEqual, "foo "},
|
||||
{dmp.DiffDelete, "bar"},
|
||||
{dmp.DiffInsert, " baz"},
|
||||
{dmp.DiffEqual, " biz"},
|
||||
}, DiffLineDel))
|
||||
}
|
||||
|
|
|
@ -90,5 +90,5 @@ func transformKey(key string) string {
|
|||
return key
|
||||
}
|
||||
|
||||
return filepath.Join(key[0:2], key[2:4], key[4:len(key)])
|
||||
return filepath.Join(key[0:2], key[2:4], key[4:])
|
||||
}
|
||||
|
|
|
@ -263,7 +263,6 @@ func NewContext() {
|
|||
return
|
||||
}
|
||||
|
||||
|
||||
if setting.MailService.UseSendmail {
|
||||
Sender = &sendmailSender{}
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue