diff options
author | Jakub Guzik <jakubmguzik@gmail.com> | 2021-02-22 14:47:08 +0100 |
---|---|---|
committer | Jakub Guzik <jakubmguzik@gmail.com> | 2021-02-22 14:48:33 +0100 |
commit | d2f3098c6f9068edfe4012387cef2e6d140ef20a (patch) | |
tree | 61e731bf1909984463adc2f845ac2ddcd7671328 /pkg/domain | |
parent | 4aaaa6c1df3a1c90a930b97552bcc970d7d99dd4 (diff) | |
download | podman-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/domain')
-rw-r--r-- | pkg/domain/entities/generate.go | 2 | ||||
-rw-r--r-- | pkg/domain/infra/tunnel/generate.go | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/pkg/domain/entities/generate.go b/pkg/domain/entities/generate.go index 4a0d7537e..3ec713edf 100644 --- a/pkg/domain/entities/generate.go +++ b/pkg/domain/entities/generate.go @@ -18,6 +18,8 @@ type GenerateSystemdOptions struct { PodPrefix string // Separator - systemd unit name separator between name/id and prefix Separator string + // NoHeader - skip header generation + NoHeader bool } // GenerateSystemdReport diff --git a/pkg/domain/infra/tunnel/generate.go b/pkg/domain/infra/tunnel/generate.go index 6d68157c1..a9196adaa 100644 --- a/pkg/domain/infra/tunnel/generate.go +++ b/pkg/domain/infra/tunnel/generate.go @@ -8,7 +8,7 @@ import ( ) func (ic *ContainerEngine) GenerateSystemd(ctx context.Context, nameOrID string, opts entities.GenerateSystemdOptions) (*entities.GenerateSystemdReport, error) { - options := new(generate.SystemdOptions).WithUseName(opts.Name).WithContainerPrefix(opts.ContainerPrefix).WithNew(opts.New) + options := new(generate.SystemdOptions).WithUseName(opts.Name).WithContainerPrefix(opts.ContainerPrefix).WithNew(opts.New).WithNoHeader(opts.NoHeader) options.WithPodPrefix(opts.PodPrefix).WithRestartPolicy(opts.RestartPolicy).WithSeparator(opts.Separator) if to := opts.StopTimeout; to != nil { options.WithStopTimeout(*opts.StopTimeout) |