From 5843038a0812cc133c1895b7410aeda7153e8708 Mon Sep 17 00:00:00 2001 From: ᴜɴᴋɴᴡᴏɴ Date: Sat, 21 Mar 2020 13:39:32 +0800 Subject: workflows: enable golangci-lint (#5998) * Create golint.yml * Update golint.yml * Update golint.yml * Fix errcheck * Fix gosimple * Fix staticcheck --- internal/tool/tool.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal/tool') diff --git a/internal/tool/tool.go b/internal/tool/tool.go index 2410b4d6..380f1069 100644 --- a/internal/tool/tool.go +++ b/internal/tool/tool.go @@ -30,7 +30,7 @@ import ( // MD5Bytes encodes string to MD5 bytes. func MD5Bytes(str string) []byte { m := md5.New() - m.Write([]byte(str)) + _, _ = m.Write([]byte(str)) return m.Sum(nil) } @@ -42,7 +42,7 @@ func MD5(str string) string { // SHA1 encodes string to SHA1 hex value. func SHA1(str string) string { h := sha1.New() - h.Write([]byte(str)) + _, _ = h.Write([]byte(str)) return hex.EncodeToString(h.Sum(nil)) } @@ -182,7 +182,7 @@ func CreateTimeLimitCode(data string, minutes int, startInf interface{}) string func HashEmail(email string) string { email = strings.ToLower(strings.TrimSpace(email)) h := md5.New() - h.Write([]byte(email)) + _, _ = h.Write([]byte(email)) return hex.EncodeToString(h.Sum(nil)) } -- cgit v1.2.3