github.com/walkingsparrow/docker@v1.4.2-0.20151218153551-b708a2249bfa/api/client/lib/image_load.go (about) 1 package lib 2 3 import ( 4 "io" 5 "net/url" 6 ) 7 8 // ImageLoad loads an image in the docker host from the client host. 9 // It's up to the caller to close the io.ReadCloser returned by 10 // this function. 11 func (cli *Client) ImageLoad(input io.Reader) (io.ReadCloser, error) { 12 resp, err := cli.postRaw("/images/load", url.Values{}, input, nil) 13 if err != nil { 14 return nil, err 15 } 16 return resp.body, nil 17 }