fix gofmt error

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
tokarchuk/v1.17
Bo-Yi Wu 8 years ago committed by Kim "BKC" Carlbäcker
parent d0490c187c
commit 6510e57758
  1. 16
      models/git_diff_test.go
  2. 2
      modules/lfs/content_store.go
  3. 1
      modules/mailer/mailer.go

@ -20,16 +20,16 @@ func assertLineEqual(t *testing.T, d1 *DiffLine, d2 *DiffLine) {
func TestDiffToHTML(t *testing.T) { func TestDiffToHTML(t *testing.T) {
assertEqual(t, "+foo <span class=\"added-code\">bar</span> biz", diffToHTML([]dmp.Diff{ assertEqual(t, "+foo <span class=\"added-code\">bar</span> biz", diffToHTML([]dmp.Diff{
dmp.Diff{dmp.DiffEqual, "foo "}, {dmp.DiffEqual, "foo "},
dmp.Diff{dmp.DiffInsert, "bar"}, {dmp.DiffInsert, "bar"},
dmp.Diff{dmp.DiffDelete, " baz"}, {dmp.DiffDelete, " baz"},
dmp.Diff{dmp.DiffEqual, " biz"}, {dmp.DiffEqual, " biz"},
}, DiffLineAdd)) }, DiffLineAdd))
assertEqual(t, "-foo <span class=\"removed-code\">bar</span> biz", diffToHTML([]dmp.Diff{ assertEqual(t, "-foo <span class=\"removed-code\">bar</span> biz", diffToHTML([]dmp.Diff{
dmp.Diff{dmp.DiffEqual, "foo "}, {dmp.DiffEqual, "foo "},
dmp.Diff{dmp.DiffDelete, "bar"}, {dmp.DiffDelete, "bar"},
dmp.Diff{dmp.DiffInsert, " baz"}, {dmp.DiffInsert, " baz"},
dmp.Diff{dmp.DiffEqual, " biz"}, {dmp.DiffEqual, " biz"},
}, DiffLineDel)) }, DiffLineDel))
} }

@ -90,5 +90,5 @@ func transformKey(key string) string {
return key 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 return
} }
if setting.MailService.UseSendmail { if setting.MailService.UseSendmail {
Sender = &sendmailSender{} Sender = &sendmailSender{}
} else { } else {

Loading…
Cancel
Save