diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-05-04 16:25:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-04 16:25:57 +0800 |
commit | 9bb218734c53c98a13264c2f4f479e3633ccfe18 (patch) | |
tree | f32557409337e18d9f7959dcb2089f0bf698513b /internal/tool | |
parent | 82ffca3fc9988345016c8033f7f65c5b028dfe10 (diff) |
db: use GORM to backup and restore non-legacy tables (#6142)
Diffstat (limited to 'internal/tool')
-rw-r--r-- | internal/tool/tool.go | 8 |
1 files changed, 0 insertions, 8 deletions
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 { |