diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-08-17 09:39:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-17 09:39:19 +0000 |
commit | a9131050cfca0844aabae505a3df6d43426a9fed (patch) | |
tree | b7306b2f742a6ef2bd2efa31db11e5705a4957e1 /pkg/bindings | |
parent | fd0142d8ee78ac2fce6157f9e72b20c007b585ce (diff) | |
parent | 7e7a79b075f7d65657d95169f02c2c1c03198b93 (diff) | |
download | podman-a9131050cfca0844aabae505a3df6d43426a9fed.tar.gz podman-a9131050cfca0844aabae505a3df6d43426a9fed.tar.bz2 podman-a9131050cfca0844aabae505a3df6d43426a9fed.zip |
Merge pull request #15350 from nalind/manifest-amend
podman manifest create: accept --amend and --insecure flags
Diffstat (limited to 'pkg/bindings')
-rw-r--r-- | pkg/bindings/manifests/types.go | 3 | ||||
-rw-r--r-- | pkg/bindings/manifests/types_create_options.go | 15 |
2 files changed, 17 insertions, 1 deletions
diff --git a/pkg/bindings/manifests/types.go b/pkg/bindings/manifests/types.go index e23ef798d..5f2557fe1 100644 --- a/pkg/bindings/manifests/types.go +++ b/pkg/bindings/manifests/types.go @@ -8,7 +8,8 @@ type InspectOptions struct { //go:generate go run ../generator/generator.go CreateOptions // CreateOptions are optional options for creating manifests type CreateOptions struct { - All *bool + All *bool + Amend *bool } //go:generate go run ../generator/generator.go ExistsOptions diff --git a/pkg/bindings/manifests/types_create_options.go b/pkg/bindings/manifests/types_create_options.go index 960332a82..09942c00a 100644 --- a/pkg/bindings/manifests/types_create_options.go +++ b/pkg/bindings/manifests/types_create_options.go @@ -31,3 +31,18 @@ func (o *CreateOptions) GetAll() bool { } return *o.All } + +// WithAmend set field Amend to given value +func (o *CreateOptions) WithAmend(value bool) *CreateOptions { + o.Amend = &value + return o +} + +// GetAmend returns value of field Amend +func (o *CreateOptions) GetAmend() bool { + if o.Amend == nil { + var z bool + return z + } + return *o.Amend +} |