Add null io option

This adds null IO option for efficient handling of IO.
It provides a container directly with `/dev/null` and does not require
any io.Copy within the shim whenever a user does not want the IO of the
container.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-08-11 16:40:08 -04:00
parent 77035a6e65
commit eb58ecab7c
6 changed files with 32 additions and 18 deletions

View File

@@ -19,8 +19,7 @@ import (
)
func empty() IOCreation {
null := ioutil.Discard
return NewIO(bytes.NewBuffer(nil), null, null)
return NullIO
}
func TestContainerList(t *testing.T) {