aboutsummaryrefslogtreecommitdiff
path: root/contact.go
blob: ea0b78029513ede6c5a7ddc4f40064a2e89becea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package acme

import "encoding"

type Mail string
type Phone string

type Contact interface {
	encoding.TextMarshaler
}

func (m Mail) MarshalText() ([]byte, error)   { return []byte("mailto:" + m), nil }
func (ph Phone) MarshalText() ([]byte, error) { return []byte("tel:" + ph), nil }