code: func (c *Client) DiscoveryDoc(ctx context.Context) (io.Reader, error) {
  	res, err := c.discoveryResp(ctx)
  	if err != nil {
  		return nil, err
  	}
  	defer res.Body.Close()
  	const maxSize = 1 << 20
  	all, err := ioutil.ReadAll(io.LimitReader(res.Body, maxSize+1))
  	if err != nil {
  		return nil, err
  	}
  	if len(all) > maxSize {
  		return nil, errors.New("discovery document oddly large")
  	}
  	if len(all) > 0 && all[len(all)-1] != '\n' {
  		all = append(all, '\n')
  	}
  	return bytes.NewReader(all), err
  }
docs: // DiscoveryDoc returns the server's JSON discovery document.
  // This method exists purely for the "camtool discovery" command.
  // Clients shouldn't have to parse this themselves.