diff options
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | 2021-04-09 08:04:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-09 08:04:51 +0000 |
commit | 14375f35ee00c16327edcd0f5883cc66810fc7db (patch) | |
tree | d904edbc6162b8eddc563476614d03dd1eee75ed /vendor/k8s.io/apimachinery/pkg/util/validation | |
parent | 4efac1f76012c35122bca7c8feebc33141fc47d3 (diff) | |
download | podman-14375f35ee00c16327edcd0f5883cc66810fc7db.tar.gz podman-14375f35ee00c16327edcd0f5883cc66810fc7db.tar.bz2 podman-14375f35ee00c16327edcd0f5883cc66810fc7db.zip |
Bump k8s.io/api from 0.20.5 to 0.21.0
Bumps [k8s.io/api](https://github.com/kubernetes/api) from 0.20.5 to 0.21.0.
- [Release notes](https://github.com/kubernetes/api/releases)
- [Commits](https://github.com/kubernetes/api/compare/v0.20.5...v0.21.0)
Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/k8s.io/apimachinery/pkg/util/validation')
-rw-r--r-- | vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go b/vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go index f9be7ac33..daccb0589 100644 --- a/vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go +++ b/vendor/k8s.io/apimachinery/pkg/util/validation/field/path.go @@ -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 |