diff options
author | Unknwon <u@gogs.io> | 2017-04-06 17:13:53 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-04-06 17:13:53 -0400 |
commit | 0e271799f2ec744332761cd87fe0d96f4d9653e0 (patch) | |
tree | a49a9609b8b37e972a60b505b2e3900922e55497 /pkg/template/template.go | |
parent | 3c0de1713367ffecfe4606ad0553a550f568e74d (diff) |
Refactoring: rename and simplify pkg/tool functions
Diffstat (limited to 'pkg/template/template.go')
-rw-r--r-- | pkg/template/template.go | 6 |
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) { |