update vendor

Signed-off-by: Roland.Ma <rolandma@yunify.com>
This commit is contained in:
Roland.Ma
2021-08-11 07:10:14 +00:00
parent a18f72b565
commit ea8f47c73a
2901 changed files with 269317 additions and 43103 deletions

30
vendor/sigs.k8s.io/kustomize/api/resource/idset.go generated vendored Normal file
View File

@@ -0,0 +1,30 @@
// Copyright 2020 The Kubernetes Authors.
// SPDX-License-Identifier: Apache-2.0
package resource
import "sigs.k8s.io/kustomize/api/resid"
type IdSet struct {
ids map[resid.ResId]bool
}
func MakeIdSet(slice []*Resource) *IdSet {
set := make(map[resid.ResId]bool)
for _, r := range slice {
id := r.CurId()
if _, ok := set[id]; !ok {
set[id] = true
}
}
return &IdSet{ids: set}
}
func (s IdSet) Contains(id resid.ResId) bool {
_, ok := s.ids[id]
return ok
}
func (s IdSet) Size() int {
return len(s.ids)
}