Skip to content

Commit

Permalink
fix(selector): version NodeFilter append func (#2671)
Browse files Browse the repository at this point in the history
  • Loading branch information
180909 authored Feb 23, 2023
1 parent bab67fa commit d8d231e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selector/filter/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// Version is version filter.
func Version(version string) selector.NodeFilter {
return func(_ context.Context, nodes []selector.Node) []selector.Node {
newNodes := nodes[:0]
newNodes := make([]selector.Node, 0)
for _, n := range nodes {
if n.Version() == version {
newNodes = append(newNodes, n)
Expand Down

0 comments on commit d8d231e

Please sign in to comment.