Skip to content
Permalink
Browse files
style:create map to allocate space
  • Loading branch information
baerwang committed Jan 30, 2022
1 parent 0de5a04 commit 2dc553e753d54db9819b0dd58786795d793c8544
Showing 2 changed files with 2 additions and 2 deletions.
@@ -28,7 +28,7 @@ type Exact struct {
}

func (p *Exact) load(apis []*Resource) {
m := map[string]string{}
m := make(map[string]string, len(apis))

for _, api := range apis {
apiName := api.Name
@@ -29,7 +29,7 @@ type Regex struct {
}

func (p *Regex) load(apis []*Resource) {
m := map[string]string{}
m := make(map[string]string, len(apis))

for _, api := range apis {
apiName := api.Name

0 comments on commit 2dc553e

Please sign in to comment.