aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-12-27 00:37:47 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-12-27 00:37:47 +0100
commit13be0f746259664cbaff1b4fef9d65dd278391a2 (patch)
tree11692a3678d8290fee4e77b1e9e7ec063ffcbfcd
parent36fbcdd2bdef6176538367f71fa25609b18a705c (diff)
Hide other fields
-rw-r--r--account.go6
-rw-r--r--client.go4
2 files changed, 5 insertions, 5 deletions
diff --git a/account.go b/account.go
index 37b8ec0..cbe2772 100644
--- a/account.go
+++ b/account.go
@@ -16,7 +16,7 @@ const KeySize = 2048
// Account ...
type Account struct {
- Contact Contacts
+ contact Contacts
privKey *rsa.PrivateKey
signer jose.Signer
nonce chan string
@@ -36,13 +36,13 @@ func (a *Account) AddMail(email string) error {
if err != nil {
return err
}
- a.Contact = append(a.Contact, Mail(m.Address))
+ a.contact = append(a.contact, Mail(m.Address))
return nil
}
func (a *Account) AddPhone(phone string) error {
if ph := strings.TrimSpace(phone); ph != "" {
- a.Contact = append(a.Contact, Phone(ph))
+ a.contact = append(a.contact, Phone(ph))
}
return nil
}
diff --git a/client.go b/client.go
index 45dca55..d0d1bcf 100644
--- a/client.go
+++ b/client.go
@@ -173,7 +173,7 @@ func parseHeader(r *http.Response) nextStep {
func (c *Client) Register(a *Account) error {
r := &Registration{
Resource: ResNewReg,
- Contact: a.Contact,
+ Contact: a.contact,
}
resp, err := c.post(c.NewReg, a, r)
if err != nil && err.(Problem).Err != ErrMalformed {
@@ -194,7 +194,7 @@ func (c *Client) Register(a *Account) error {
if tos := ns.Link["terms-of-service"]; tos != "" {
r = &Registration{
Resource: ResRegister,
- Contact: a.Contact,
+ Contact: a.contact,
Agreement: tos,
}
_, err = c.post(ns.Location.String(), a, r)