mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 03:13:49 +08:00
chore: preallocate slices where we have a good idea of requirements (#91596)
* chore: preallocate slices where we have a good idea of requirements * pr feedback
This commit is contained in:
@ -191,7 +191,7 @@ func eraseAny(value string, strToErase ...string) string {
|
||||
if len(strToErase) == 0 {
|
||||
return value
|
||||
}
|
||||
var replaceSeq []string
|
||||
replaceSeq := make([]string, 0, len(strToErase)*2)
|
||||
for _, s := range strToErase {
|
||||
replaceSeq = append(replaceSeq, s, "")
|
||||
}
|
||||
|
Reference in New Issue
Block a user