Browse code

Update doc for CopyFromContainer

This fix updates doc for CopyFromContainer to explicitly
mention that the content received from the reader is
a TAR archive.

This fix closes 35965.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

Yong Tang authored on 2018/01/09 03:29:59
Showing 1 changed files
... ...
@@ -30,7 +30,7 @@ func (cli *Client) ContainerStatPath(ctx context.Context, containerID, path stri
30 30
 }
31 31
 
32 32
 // CopyToContainer copies content into the container filesystem.
33
-// Note that `content` must be a Reader for a TAR
33
+// Note that `content` must be a Reader for a TAR archive
34 34
 func (cli *Client) CopyToContainer(ctx context.Context, container, path string, content io.Reader, options types.CopyToContainerOptions) error {
35 35
 	query := url.Values{}
36 36
 	query.Set("path", filepath.ToSlash(path)) // Normalize the paths used in the API.
... ...
@@ -59,7 +59,7 @@ func (cli *Client) CopyToContainer(ctx context.Context, container, path string,
59 59
 }
60 60
 
61 61
 // CopyFromContainer gets the content from the container and returns it as a Reader
62
-// to manipulate it in the host. It's up to the caller to close the reader.
62
+// for a TAR archive to manipulate it in the host. It's up to the caller to close the reader.
63 63
 func (cli *Client) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) {
64 64
 	query := make(url.Values, 1)
65 65
 	query.Set("path", filepath.ToSlash(srcPath)) // Normalize the paths used in the API.