From 5afca6ca8eaadebc613dce291da2bae1030ccca9 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:33:55 +0800 Subject: autofix: function call can be replaced with helper function (#6805) Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> --- internal/template/template.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/template') diff --git a/internal/template/template.go b/internal/template/template.go index dcb56639..2ed0315c 100644 --- a/internal/template/template.go +++ b/internal/template/template.go @@ -146,7 +146,7 @@ func Str2HTML(raw string) template.HTML { // NewLine2br simply replaces "\n" to "
". func NewLine2br(raw string) string { - return strings.Replace(raw, "\n", "
", -1) + return strings.ReplaceAll(raw, "\n", "
") } func Sha1(str string) string { -- cgit v1.2.3