mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-12-24 06:17:15 +00:00
refactor: replace strings.Replace with strings.ReplaceAll (#15392)
strings.ReplaceAll(s, old, new) is a wrapper function for strings.Replace(s, old, new, -1). But strings.ReplaceAll is more readable and removes the hardcoded -1. Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
@@ -482,7 +482,7 @@ func containsMultilineStatement(stmt string) bool {
|
||||
}
|
||||
stmtWithoutLiterals := stmt
|
||||
for _, literal := range literals {
|
||||
stmtWithoutLiterals = strings.Replace(stmt, literal, "", -1)
|
||||
stmtWithoutLiterals = strings.ReplaceAll(stmt, literal, "")
|
||||
}
|
||||
// Now look for the word "END" specifically. This will miss any
|
||||
// representations of END that aren't surrounded by spaces, but
|
||||
|
||||
Reference in New Issue
Block a user