index
:
gogs.git
Gogs is a painless self-hosted Git service
log msg
author
committer
range
buildscript
main
mygogs
about
summary
refs
log
tree
commit
diff
path:
root
/
modules
/
base
/
template.go
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
author
skyblue <ssx205@gmail.com>
2014-04-06 23:12:29 +0800
committer
skyblue <ssx205@gmail.com>
2014-04-06 23:12:29 +0800
commit
5e534bf2a56a2f4e36d039699ba60946f993574b
(
patch
)
tree
17fd6a6dde814567538fe1a84126f83303df3904
/
modules/base/template.go
parent
a04918e36d49e1d066c6f661a73eebf706a97237
(
diff
)
parent
d3a987eded8bf2d0afc35dce32238e59da8080a8
(
diff
)
Merge branch 'dev' of github.com:gogits/gogs into dev
Diffstat
(limited to 'modules/base/template.go')
-rw-r--r--
modules/base/template.go
4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/base/template.go b/modules/base/template.go
index dfcae931..56b77a5d 100644
--- a/
modules/base/template.go
+++ b/
modules/base/template.go
@@ -67,6 +67,10 @@ var TemplateFuncs template.FuncMap = map[string]interface{}{
"DateFormat": DateFormat,
"List": List,
"Mail2Domain": func(mail string) string {
+ if !strings.Contains(mail, "@") {
+ return "try.gogits.org"
+ }
+
suffix := strings.SplitN(mail, "@", 2)[1]
domain, ok := mailDomains[suffix]
if !ok {