File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ func makeExcludeFilter(exclude []string) *primitive.E {
106106 if len (exclude ) == 0 {
107107 return nil
108108 }
109- var filterExpressions []bson.D
109+ filterExpressions := make ( []bson.D , 0 , len ( exclude ))
110110 for _ , dbname := range exclude {
111111 filterExpressions = append (filterExpressions ,
112112 bson.D {{Key : "name" , Value : bson.D {{Key : "$ne" , Value : dbname }}}},
@@ -117,12 +117,12 @@ func makeExcludeFilter(exclude []string) *primitive.E {
117117}
118118
119119func makeDBsFilter (filterInNamespaces []string ) * primitive.E {
120- filterExpressions := []bson.D {}
121120
122121 nss := removeEmptyStrings (filterInNamespaces )
123122 if len (nss ) == 0 {
124123 return nil
125124 }
125+ filterExpressions := make ([]bson.D , 0 , len (nss ))
126126 for _ , namespace := range nss {
127127 parts := strings .Split (namespace , "." )
128128 filterExpressions = append (filterExpressions ,
You can’t perform that action at this time.
0 commit comments