diff options
author | deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> | 2022-03-06 16:33:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-06 16:33:55 +0800 |
commit | 5afca6ca8eaadebc613dce291da2bae1030ccca9 (patch) | |
tree | 46f86403c6abdeabd6172ee5243caa3bfe5a79a4 /internal/template | |
parent | deec3516d53e9a9679128ade0556ccc818a67be1 (diff) |
autofix: function call can be replaced with helper function (#6805)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Diffstat (limited to 'internal/template')
-rw-r--r-- | internal/template/template.go | 2 |
1 files changed, 1 insertions, 1 deletions
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 "<br>". func NewLine2br(raw string) string { - return strings.Replace(raw, "\n", "<br>", -1) + return strings.ReplaceAll(raw, "\n", "<br>") } func Sha1(str string) string { |