From b4a410215ef0d6ebac6e5b61921f2cbe5d9ac8bd Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Fri, 5 Jun 2020 15:34:04 +0200 Subject: add (*Pod).CreateCommand() Add a method to Pod to easily access its .config.CreateCommand. Signed-off-by: Valentin Rothberg --- libpod/pod.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libpod') diff --git a/libpod/pod.go b/libpod/pod.go index 7af78fa07..db87e60f2 100644 --- a/libpod/pod.go +++ b/libpod/pod.go @@ -129,6 +129,12 @@ func (p *Pod) CreatedTime() time.Time { return p.config.CreatedTime } +// CreateCommand returns the os.Args of the process with which the pod has been +// created. +func (p *Pod) CreateCommand() []string { + return p.config.CreateCommand +} + // CgroupParent returns the pod's CGroup parent func (p *Pod) CgroupParent() string { return p.config.CgroupParent -- cgit v1.2.3-54-g00ecf