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/route/repo/view.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'internal/route/repo/view.go')
diff --git a/internal/route/repo/view.go b/internal/route/repo/view.go
index e9f340cb..89d6f86d 100644
--- a/internal/route/repo/view.go
+++ b/internal/route/repo/view.go
@@ -95,7 +95,7 @@ func renderDirectory(c *context.Context, treeLink string) {
c.Data["IsIPythonNotebook"] = true
c.Data["RawFileLink"] = c.Repo.RepoLink + "/raw/" + path.Join(c.Repo.BranchName, c.Repo.TreePath, readmeFile.Name())
default:
- p = bytes.Replace(p, []byte("\n"), []byte(`
`), -1)
+ p = bytes.ReplaceAll(p, []byte("\n"), []byte(`
`))
}
c.Data["FileContent"] = string(p)
}
--
cgit v1.2.3