code: func (r *registry) Repositories(ctx context.Context, entries []string, last string) (int, error) {
  	var numFilled int
  	var returnErr error
  
  	values := buildCatalogValues(len(entries), last)
  	u, err := r.ub.BuildCatalogURL(values)
  	if err != nil {
  		return 0, err
  	}
  
  	resp, err := r.client.Get(u)
  	if err != nil {
  		return 0, err
  	}
  	defer resp.Body.Close()
  
  	if SuccessStatus(resp.StatusCode) {
  		var ctlg struct {
  			Repositories []string `json:"repositories"`
  		}
  		decoder := json.NewDecoder(resp.Body)
  
  		if err := decoder.Decode(&ctlg); err != nil {
  			return 0, err
  		}
  
  		for cnt := range ctlg.Repositories {
  			entries[cnt] = ctlg.Repositories[cnt]
  		}
  		numFilled = len(ctlg.Repositories)
  
  		link := resp.Header.Get("Link")
  		if link == "" {
  			returnErr = io.EOF
  		}
  	} else {
  		return 0, HandleErrorResponse(resp)
  	}
  
  	return numFilled, returnErr
  }
docs: // Repositories returns a lexigraphically sorted catalog given a base URL.  The 'entries' slice will be filled up to the size
  // of the slice, starting at the value provided in 'last'.  The number of entries will be returned along with io.EOF if there
  // are no more entries