From 0e271799f2ec744332761cd87fe0d96f4d9653e0 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 6 Apr 2017 17:13:53 -0400 Subject: Refactoring: rename and simplify pkg/tool functions --- pkg/template/template.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/template') 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) { -- cgit v1.2.3