Add id to state command to return single container
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
58c5eb5ecb
commit
76d69b4ed8
8 changed files with 100 additions and 78 deletions
|
@ -51,6 +51,21 @@ type Stdio struct {
|
|||
Stderr string
|
||||
}
|
||||
|
||||
func NewStdio(stdin, stdout, stderr string) Stdio {
|
||||
for _, s := range []*string{
|
||||
&stdin, &stdout, &stderr,
|
||||
} {
|
||||
if *s == "" {
|
||||
*s = "/dev/null"
|
||||
}
|
||||
}
|
||||
return Stdio{
|
||||
Stdin: stdin,
|
||||
Stdout: stdout,
|
||||
Stderr: stderr,
|
||||
}
|
||||
}
|
||||
|
||||
// New returns a new container
|
||||
func New(root, id, bundle string) (Container, error) {
|
||||
c := &container{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue