title: Golang - Docker API - parse result of ImagePull
body: <p>I'm developing a <code>Go</code> script that uses the <code>Docker API</code> for the purposes of my project. After I login to my repository, I pull the Docker image I want, but the problem is that the <a href="https://godoc.org/github.com/moby/moby/client#Client.ImagePull" rel="noreferrer">ImagePull</a> function returns an instance of <a href="https://godoc.org/io#ReadCloser" rel="noreferrer">io.ReadCloser</a>, which I'm only able to pass to the system output via:</p>
  
  <pre><code>io.Copy(os.Stdout, pullResp)
  </code></pre>
  
  <p>It's cool that I can see the response, but I can't find a decent way to parse it and implement a logic depending on it, which will do some things if a new version of the image have been downloaded, and other things if the image was up to date.<br />
  I'll be glad if you share your experience, if you have ever faced this problem.</p>