1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-02-09 13:47:11 +02:00

utils: ReplaceAll -> Replace

Fix compatibility with older Go compiler versions
This commit is contained in:
Dawid Dziurla 2020-10-13 17:25:37 +02:00 committed by GitHub
parent b1dd3c4866
commit 327b6ad097
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,8 +102,8 @@ func Loader() string {
// ResolvePlaceholderString populates a template with values
func ResolvePlaceholderString(str string, arguments map[string]string) string {
for key, value := range arguments {
str = strings.ReplaceAll(str, "{{"+key+"}}", value)
str = strings.ReplaceAll(str, "{{."+key+"}}", value)
str = strings.Replace(str, "{{"+key+"}}", value, -1)
str = strings.Replace(str, "{{."+key+"}}", value, -1)
}
return str
}