summaryrefslogtreecommitdiff
path: root/pkg/bindings/generate
diff options
context:
space:
mode:
authorJakub Guzik <jakubmguzik@gmail.com>2021-02-22 14:47:08 +0100
committerJakub Guzik <jakubmguzik@gmail.com>2021-02-22 14:48:33 +0100
commitd2f3098c6f9068edfe4012387cef2e6d140ef20a (patch)
tree61e731bf1909984463adc2f845ac2ddcd7671328 /pkg/bindings/generate
parent4aaaa6c1df3a1c90a930b97552bcc970d7d99dd4 (diff)
downloadpodman-d2f3098c6f9068edfe4012387cef2e6d140ef20a.tar.gz
podman-d2f3098c6f9068edfe4012387cef2e6d140ef20a.tar.bz2
podman-d2f3098c6f9068edfe4012387cef2e6d140ef20a.zip
--no-header flag implementation for generate systemd
Signed-off-by: Jakub Guzik <jakubmguzik@gmail.com>
Diffstat (limited to 'pkg/bindings/generate')
-rw-r--r--pkg/bindings/generate/types.go2
-rw-r--r--pkg/bindings/generate/types_systemd_options.go16
2 files changed, 18 insertions, 0 deletions
diff --git a/pkg/bindings/generate/types.go b/pkg/bindings/generate/types.go
index 4e9d7a0ff..3c9ea87d4 100644
--- a/pkg/bindings/generate/types.go
+++ b/pkg/bindings/generate/types.go
@@ -14,6 +14,8 @@ type SystemdOptions struct {
UseName *bool
// New - create a new container instead of starting a new one.
New *bool
+ // NoHeader - Removes autogenerated by Podman and timestamp if set to true
+ NoHeader *bool
// RestartPolicy - systemd restart policy.
RestartPolicy *string
// StopTimeout - time when stopping the container.
diff --git a/pkg/bindings/generate/types_systemd_options.go b/pkg/bindings/generate/types_systemd_options.go
index dc7378888..25ed446aa 100644
--- a/pkg/bindings/generate/types_systemd_options.go
+++ b/pkg/bindings/generate/types_systemd_options.go
@@ -52,6 +52,22 @@ func (o *SystemdOptions) GetNew() bool {
return *o.New
}
+// WithNoHeader
+func (o *SystemdOptions) WithNoHeader(value bool) *SystemdOptions {
+ v := &value
+ o.NoHeader = v
+ return o
+}
+
+// GetNoHeader
+func (o *SystemdOptions) GetNoHeader() bool {
+ var noHeader bool
+ if o.NoHeader == nil {
+ return noHeader
+ }
+ return *o.NoHeader
+}
+
// WithRestartPolicy
func (o *SystemdOptions) WithRestartPolicy(value string) *SystemdOptions {
v := &value