diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-02-23 13:07:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-23 13:07:00 -0500 |
commit | 991c90de1fca66e7c99b864816d0292dd33b73dc (patch) | |
tree | fc405d7a90ae4d3f755a4760c17f3d84e94550f7 /pkg/bindings | |
parent | 113f855802176a4ffbe167304ab83942116a65f1 (diff) | |
parent | fbbcb957c710ab817c969a8dc3ff3c46619604e2 (diff) | |
download | podman-991c90de1fca66e7c99b864816d0292dd33b73dc.tar.gz podman-991c90de1fca66e7c99b864816d0292dd33b73dc.tar.bz2 podman-991c90de1fca66e7c99b864816d0292dd33b73dc.zip |
Merge pull request #13314 from flouthoc/container-commit-squash
container-commit: support `--squash` to squash layers into one if users want.
Diffstat (limited to 'pkg/bindings')
-rw-r--r-- | pkg/bindings/containers/types.go | 1 | ||||
-rw-r--r-- | pkg/bindings/containers/types_commit_options.go | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/pkg/bindings/containers/types.go b/pkg/bindings/containers/types.go index 4915e3e23..66b90af9b 100644 --- a/pkg/bindings/containers/types.go +++ b/pkg/bindings/containers/types.go @@ -30,6 +30,7 @@ type CommitOptions struct { Comment *string Format *string Pause *bool + Squash *bool Repo *string Tag *string } diff --git a/pkg/bindings/containers/types_commit_options.go b/pkg/bindings/containers/types_commit_options.go index 7eb04198f..7b4745eb8 100644 --- a/pkg/bindings/containers/types_commit_options.go +++ b/pkg/bindings/containers/types_commit_options.go @@ -92,6 +92,21 @@ func (o *CommitOptions) GetPause() bool { return *o.Pause } +// WithSquash set field Squash to given value +func (o *CommitOptions) WithSquash(value bool) *CommitOptions { + o.Squash = &value + return o +} + +// GetSquash returns value of field Squash +func (o *CommitOptions) GetSquash() bool { + if o.Squash == nil { + var z bool + return z + } + return *o.Squash +} + // WithRepo set field Repo to given value func (o *CommitOptions) WithRepo(value string) *CommitOptions { o.Repo = &value |