From d2f3098c6f9068edfe4012387cef2e6d140ef20a Mon Sep 17 00:00:00 2001 From: Jakub Guzik Date: Mon, 22 Feb 2021 14:47:08 +0100 Subject: --no-header flag implementation for generate systemd Signed-off-by: Jakub Guzik --- pkg/bindings/generate/types.go | 2 ++ pkg/bindings/generate/types_systemd_options.go | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) (limited to 'pkg/bindings/generate') 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 -- cgit v1.2.3-54-g00ecf