diff options
author | Sebastiaan van Stijn <github@gone.nl> | 2022-10-19 12:21:18 +0200 |
---|---|---|
committer | Sebastiaan van Stijn <github@gone.nl> | 2022-10-21 01:48:56 +0200 |
commit | 92eca900b086200b4f270cf438a8a5ff9c8c2a3b (patch) | |
tree | 6740ee2c9adcab1a3548d4fe2d91433f1ac98afb /testutil | |
parent | c93c9bca8ef926034843c4cd95a8efe64f38611f (diff) | |
download | docker-92eca900b086200b4f270cf438a8a5ff9c8c2a3b.tar.gz |
Revert "testutil/registry: remove unused WithStdout(), WithStErr() opts"
This reverts commit 1f21c4dd0512e899ecf4077a927d99debac28f6d.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'testutil')
-rw-r--r-- | testutil/registry/ops.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testutil/registry/ops.go b/testutil/registry/ops.go index c004f37424..7357d5f509 100644 --- a/testutil/registry/ops.go +++ b/testutil/registry/ops.go @@ -1,5 +1,7 @@ package registry +import "io" + // Schema1 sets the registry to serve v1 api func Schema1(c *Config) { c.schema1 = true @@ -24,3 +26,17 @@ func URL(registryURL string) func(*Config) { c.registryURL = registryURL } } + +// WithStdout sets the stdout of the registry command to the passed in writer. +func WithStdout(w io.Writer) func(c *Config) { + return func(c *Config) { + c.stdout = w + } +} + +// WithStderr sets the stdout of the registry command to the passed in writer. +func WithStderr(w io.Writer) func(c *Config) { + return func(c *Config) { + c.stderr = w + } +} |