fix(selector): version NodeFilter append func (#2671)

pull/2679/head
180909 2 years ago committed by GitHub
parent bab67facad
commit d8d231e725
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      selector/filter/version.go

@ -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)

Loading…
Cancel
Save