From 9bb218734c53c98a13264c2f4f479e3633ccfe18 Mon Sep 17 00:00:00 2001 From: ᴜɴᴋɴᴡᴏɴ Date: Mon, 4 May 2020 16:25:57 +0800 Subject: db: use GORM to backup and restore non-legacy tables (#6142) --- internal/tool/tool.go | 8 -------- 1 file changed, 8 deletions(-) (limited to 'internal/tool/tool.go') diff --git a/internal/tool/tool.go b/internal/tool/tool.go index e5825018..6f86f6bb 100644 --- a/internal/tool/tool.go +++ b/internal/tool/tool.go @@ -25,14 +25,6 @@ import ( "gogs.io/gogs/internal/conf" ) -// SHA1 encodes string to SHA1 hex value. -// TODO: Move to cryptoutil.SHA1. -func SHA1(str string) string { - h := sha1.New() - _, _ = h.Write([]byte(str)) - return hex.EncodeToString(h.Sum(nil)) -} - // ShortSHA1 truncates SHA1 string length to at most 10. func ShortSHA1(sha1 string) string { if len(sha1) > 10 { -- cgit v1.2.3