mirror of https://github.com/gogs/gogs.git
autofix: simplify slice expression to sliced value itself (#6801)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>pull/6802/head
parent
2d609b8b31
commit
442609fa17
|
@ -141,7 +141,7 @@ func RenderCrossReferenceIssueIndexPattern(rawBytes []byte, _ string, _ map[stri
|
|||
|
||||
// RenderSha1CurrentPattern renders SHA1 strings to corresponding links that assumes in the same repository.
|
||||
func RenderSha1CurrentPattern(rawBytes []byte, urlPrefix string) []byte {
|
||||
return []byte(Sha1CurrentPattern.ReplaceAllStringFunc(string(rawBytes[:]), func(m string) string {
|
||||
return []byte(Sha1CurrentPattern.ReplaceAllStringFunc(string(rawBytes), func(m string) string {
|
||||
if com.StrTo(m).MustInt() > 0 {
|
||||
return m
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue