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 }