Skip to content

Commit

Permalink
Merge pull request #233 from cuishuang/master
Browse files Browse the repository at this point in the history
fix: fix slice init length
  • Loading branch information
jjiang-stripe authored Nov 4, 2024
2 parents 1c315f8 + 97f1857 commit bffe947
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/smokescreen/metrics/mocks.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func (m *MockMetricsClient) GetCount(metric string, tags map[string]string) (uin
}
i, ok := m.counts[mName]
if !ok {
keys := make([]string, len(m.counts))
keys := make([]string, 0, len(m.counts))
for k, _ := range m.counts {
keys = append(keys, k)
}
Expand All @@ -92,7 +92,7 @@ func (m *MockMetricsClient) GetValues(metric string, tags map[string]string) ([]
}
i, ok := m.values[mName]
if !ok {
keys := make([]string, len(m.counts))
keys := make([]string, 0, len(m.counts))
for k, _ := range m.values {
keys = append(keys, k)
}
Expand Down

0 comments on commit bffe947

Please sign in to comment.