From 442609fa1786ef651c6661ce95bd2ddb25156080 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Sun, 6 Mar 2022 16:03:27 +0800 Subject: [PATCH] autofix: simplify slice expression to sliced value itself (#6801) Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> --- internal/markup/markup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/markup/markup.go b/internal/markup/markup.go index 3f2a1172e..b542f63d2 100644 --- a/internal/markup/markup.go +++ b/internal/markup/markup.go @@ -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 }