aboutsummaryrefslogtreecommitdiff
path: root/contact.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-03-06 02:33:46 +0100
committerDimitri Sokolyuk <demon@dim13.org>2016-03-06 02:33:46 +0100
commit0a76591ecf52cd7791a96d3f1b93dea6d1623702 (patch)
tree354f4bb2034ebc07e7764b149ce1b0ccfb86d32e /contact.go
parent906fd8c97f895e99fe2727ab62ea8d02e6f685a3 (diff)
Simplify contact
Diffstat (limited to 'contact.go')
-rw-r--r--contact.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/contact.go b/contact.go
index 7d6446c..11061b9 100644
--- a/contact.go
+++ b/contact.go
@@ -48,7 +48,7 @@ func (c *Contacts) UnmarshalJSON(b []byte) error {
return nil
}
-func (c *Contacts) AddMail(email string) error {
+func (c *Contacts) Mail(email string) error {
m, err := mail.ParseAddress(email)
if err != nil {
return err
@@ -57,7 +57,7 @@ func (c *Contacts) AddMail(email string) error {
return nil
}
-func (c *Contacts) AddPhone(phone string) error {
+func (c *Contacts) Phone(phone string) error {
if ph := strings.TrimSpace(phone); ph != "" {
*c = append(*c, Phone(ph))
}