From 13be0f746259664cbaff1b4fef9d65dd278391a2 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sun, 27 Dec 2015 00:37:47 +0100 Subject: Hide other fields --- account.go | 6 +++--- client.go | 4 ++-- 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) -- cgit v1.2.3