Skip to content

Commit

Permalink
fix: slice init length
Browse files Browse the repository at this point in the history
  • Loading branch information
ntheanh201 committed Oct 17, 2024
1 parent cf25636 commit 119937d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/filter/filterconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (mp *MatchProperties) ValidateForSpans() error {
if len(mp.SpanKinds) > 0 && mp.MatchType == "strict" {
for _, kind := range mp.SpanKinds {
if !spanKinds[kind] {
validSpanKinds := make([]string, len(spanKinds))
validSpanKinds := make([]string, 0, len(spanKinds))
for k := range spanKinds {
validSpanKinds = append(validSpanKinds, k)
}
Expand Down
2 changes: 1 addition & 1 deletion receiver/k8sobjectsreceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (c *Config) Validate() error {
for _, object := range c.Objects {
gvrs, ok := validObjects[object.Name]
if !ok {
availableResource := make([]string, len(validObjects))
availableResource := make([]string, 0, len(validObjects))
for k := range validObjects {
availableResource = append(availableResource, k)
}
Expand Down

0 comments on commit 119937d

Please sign in to comment.