1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-04 23:22:28 +03:00

Fix warning QF1004: could use strings.ReplaceAll instead

This commit is contained in:
Stefan Haller
2025-06-20 19:57:03 +02:00
parent 4604227238
commit c7d0aaa786
7 changed files with 12 additions and 12 deletions

View File

@ -283,7 +283,7 @@ func PrepareForChildren(cmd *exec.Cmd) {
}
func (c *OSCommand) CopyToClipboard(str string) error {
escaped := strings.Replace(str, "\n", "\\n", -1)
escaped := strings.ReplaceAll(str, "\n", "\\n")
truncated := utils.TruncateWithEllipsis(escaped, 40)
msg := utils.ResolvePlaceholderString(