code: func (r *Registrar) Register(options RegisterOptions) (*Resource, error) {
  	if r == nil || r.user == nil {
  		return nil, errors.New("acme: cannot register a nil client or user")
  	}
  
  	accMsg := acme.Account{
  		TermsOfServiceAgreed: options.TermsOfServiceAgreed,
  		Contact:              []string{},
  	}
  
  	if r.user.GetEmail() != "" {
  		log.Infof("acme: Registering account for %s", r.user.GetEmail())
  		accMsg.Contact = []string{"mailto:" + r.user.GetEmail()}
  	}
  
  	account, err := r.core.Accounts.New(accMsg)
  	if err != nil {
  		// FIXME seems impossible
  		errorDetails, ok := err.(acme.ProblemDetails)
  		if !ok || errorDetails.HTTPStatus != http.StatusConflict {
  			return nil, err
  		}
  	}
  
  	return &Resource{URI: account.Location, Body: account.Account}, nil
  }
docs: // Register the current account to the ACME server.