code: func (c credentialSet) ToSlice() []apitypes.CredentialEnvelope {
  	creds := make([]apitypes.CredentialEnvelope, len(c))
  	i := 0
  	for _, cred := range c {
  		creds[i] = *cred
  		i++
  	}
  
  	sort.Sort(credSorter(creds))
  	return creds
  }
docs: // ToSlice returns a slice of the credentials in the set, in lexicographically
  // sorted order by name.