code: func (d *diagnosticsCollector) CheckVersion() error {
  	var rsp versionResponse
  	req, err := http.NewRequest("GET", d.VersionURL, nil)
  	if err != nil {
  		return errors.Wrap(err, "making request")
  	}
  	resp, err := d.client.Do(req)
  	if err != nil {
  		return errors.Wrap(err, "getting version")
  	}
  	defer resp.Body.Close()
  
  	if resp.StatusCode != http.StatusOK {
  		return fmt.Errorf("http: status=%d", resp.StatusCode)
  	} else if err := json.NewDecoder(resp.Body).Decode(&rsp); err != nil {
  		return fmt.Errorf("json decode: %s", err)
  	}
  
  	// If version has not changed since the last check, return
  	if rsp.Version == d.lastVersion {
  		return nil
  	}
  
  	d.lastVersion = rsp.Version
  	if err := d.compareVersion(rsp.Version); err != nil {
  		d.Logger.Printf("%s\n", err.Error())
  	}
  
  	return nil
  }
docs: // CheckVersion of the local build against Pilosa master.