aboutsummaryrefslogtreecommitdiff
path: root/pkg/template/template.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-04-06 17:13:53 -0400
committerUnknwon <u@gogs.io>2017-04-06 17:13:53 -0400
commit0e271799f2ec744332761cd87fe0d96f4d9653e0 (patch)
treea49a9609b8b37e972a60b505b2e3900922e55497 /pkg/template/template.go
parent3c0de1713367ffecfe4606ad0553a550f568e74d (diff)
Refactoring: rename and simplify pkg/tool functions
Diffstat (limited to 'pkg/template/template.go')
-rw-r--r--pkg/template/template.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/template/template.go b/pkg/template/template.go
index 55bc8764..dd29ccc4 100644
--- a/pkg/template/template.go
+++ b/pkg/template/template.go
@@ -96,8 +96,8 @@ func NewFuncMap() []template.FuncMap {
"DiffTypeToStr": DiffTypeToStr,
"DiffLineTypeToStr": DiffLineTypeToStr,
"Sha1": Sha1,
- "ShortSha": tool.ShortSha,
- "MD5": tool.EncodeMD5,
+ "ShortSHA1": tool.ShortSHA1,
+ "MD5": tool.MD5,
"ActionContent2Commits": ActionContent2Commits,
"EscapePound": EscapePound,
"RenderCommitMessage": RenderCommitMessage,
@@ -142,7 +142,7 @@ func List(l *list.List) chan interface{} {
}
func Sha1(str string) string {
- return tool.EncodeSha1(str)
+ return tool.SHA1(str)
}
func ToUTF8WithErr(content []byte) (error, string) {