1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-24 11:18:36 +00:00
This commit is contained in:
Unknown
2014-04-13 03:14:43 -04:00
parent 5c2da610a2
commit 9d983f27d6
7 changed files with 9 additions and 16 deletions

View File

@@ -284,7 +284,6 @@ func TimeSince(then time.Time) string {
default:
return fmt.Sprintf("%d years %s", diff/Year, lbl)
}
return then.String()
}
const (

View File

@@ -152,7 +152,7 @@ func SendIssueMentionMail(user, owner *models.User, repo *models.Repository, iss
}
issueLink := fmt.Sprintf("%s%s/%s/issues/%d", base.AppUrl, owner.Name, repo.Name, issue.Index)
body := fmt.Sprintf(`%s mentioned you.`)
body := fmt.Sprintf(`%s mentioned you.`, user.Name)
subject := fmt.Sprintf("[%s] %s", repo.Name, issue.Name)
content := fmt.Sprintf("%s<br>-<br> <a href=\"%s\">View it on Gogs</a>.", body, issueLink)
msg := NewMailMessageFrom(tos, user.Name, subject, content)

View File

@@ -121,7 +121,7 @@ func handle(test testCase, t *testing.T, index int, post BlogPost, errors Errors
if test.ok && errors.Count() > 0 {
t.Errorf("%+v should be OK (0 errors), but had errors: %+v", test, errors)
} else if !test.ok && errors.Count() == 0 {
t.Errorf("%+v should have errors, but was OK (0 errors): %+v", test)
t.Errorf("%+v should have errors, but was OK (0 errors)", test)
}
}
@@ -132,7 +132,7 @@ func handleEmpty(test emptyPayloadTestCase, t *testing.T, index int, section Blo
if test.ok && errors.Count() > 0 {
t.Errorf("%+v should be OK (0 errors), but had errors: %+v", test, errors)
} else if !test.ok && errors.Count() == 0 {
t.Errorf("%+v should have errors, but was OK (0 errors): %+v", test)
t.Errorf("%+v should have errors, but was OK (0 errors)", test)
}
}

View File

@@ -9,7 +9,6 @@ package oauth2
import (
"encoding/json"
"fmt"
"net/http"
"net/url"
"strings"
@@ -95,11 +94,6 @@ func (t *token) ExpiryTime() time.Time {
return t.Expiry
}
// Formats tokens into string.
func (t *token) String() string {
return fmt.Sprintf("tokens: %v", t)
}
// Returns a new Google OAuth 2.0 backend endpoint.
func Google(opts *Options) martini.Handler {
opts.AuthUrl = "https://accounts.google.com/o/oauth2/auth"