mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
rebase: update kubernetes to v1.21.2
Updated kubernetes packages to latest release. resizefs package has been included into k8s.io/mount-utils package. updated code to use the same. Updates: #1968 Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
23
vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go
generated
vendored
23
vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go
generated
vendored
@ -22,6 +22,29 @@ import (
|
||||
"strconv"
|
||||
)
|
||||
|
||||
type pathOptions struct {
|
||||
path *Path
|
||||
}
|
||||
|
||||
// PathOption modifies a pathOptions
|
||||
type PathOption func(o *pathOptions)
|
||||
|
||||
// WithPath generates a PathOption
|
||||
func WithPath(p *Path) PathOption {
|
||||
return func(o *pathOptions) {
|
||||
o.path = p
|
||||
}
|
||||
}
|
||||
|
||||
// ToPath produces *Path from a set of PathOption
|
||||
func ToPath(opts ...PathOption) *Path {
|
||||
c := &pathOptions{}
|
||||
for _, opt := range opts {
|
||||
opt(c)
|
||||
}
|
||||
return c.path
|
||||
}
|
||||
|
||||
// Path represents the path from some root to a particular field.
|
||||
type Path struct {
|
||||
name string // the name of this field or "" if this is an index
|
||||
|
Reference in New Issue
Block a user