types.go
func (pn PhoneNumber) Friendly() string {
	num, err := libphonenumber.Parse(string(pn), "US")
	if err != nil {
		return string(pn)
	}
	return libphonenumber.Format(num, libphonenumber.INTERNATIONAL)
}
func (pn PhoneNumber) Friendly() string {
	num, err := libphonenumber.Parse(string(pn), "US")
	if err != nil {
		return string(pn)
	}
	return libphonenumber.Format(num, libphonenumber.INTERNATIONAL)
}
func ( pn PhoneNumber ) Friendly ( ) string { num , err := libphonenumber . Parse ( string ( pn ) , " " ) if err != nil { return string ( pn ) } return libphonenumber . Format ( num , libphonenumber . INTERNATIONAL ) }
// Friendly returns a friendly international representation of the phone
// number, for example, "+14105554092" is returned as "+1 410-555-4092". If the
// phone number is not in E.164 format, we try to parse it as a US number. If
// we cannot parse it as a US number, it is returned as is.
Friendly returns a friendly international representation of the phone number for example + 14105554092 is returned as + 1 410 - 555 - 4092 . If the phone number is not in E . 164 format we try to parse it as a US number . If we cannot parse it as a US number it is returned as is .