code: func logArchiveOutput(r io.Reader, prefix string) {
  	pr, pw := io.Pipe()
  	r = ioutil.NopCloser(io.TeeReader(r, pw))
  	go func() {
  		err := func() error {
  			tr := tar.NewReader(pr)
  			for {
  				h, err := tr.Next()
  				if err != nil {
  					return err
  				}
  				glog.Infof("%s %s (%d %s)", prefix, h.Name, h.Size, h.FileInfo().Mode())
  				if _, err := io.Copy(ioutil.Discard, tr); err != nil {
  					return err
  				}
  			}
  		}()
  		if err != io.EOF {
  			glog.Infof("%s: unable to log archive output: %v", prefix, err)
  			io.Copy(ioutil.Discard, pr)
  		}
  	}()
  }
docs: // logArchiveOutput prints log info about the provided tar file as it is streamed. If an
  // error occurs the remainder of the pipe is read to prevent blocking.