types.go
func (pn PhoneNumber) Local() string {
	num, err := libphonenumber.Parse(string(pn), "US")
	if err != nil {
		return string(pn)
	}
	return libphonenumber.Format(num, libphonenumber.NATIONAL)
}
func (pn PhoneNumber) Local() string {
	num, err := libphonenumber.Parse(string(pn), "US")
	if err != nil {
		return string(pn)
	}
	return libphonenumber.Format(num, libphonenumber.NATIONAL)
}
func ( pn PhoneNumber ) Local ( ) string { num , err := libphonenumber . Parse ( string ( pn ) , " " ) if err != nil { return string ( pn ) } return libphonenumber . Format ( num , libphonenumber . NATIONAL ) }
// Local returns a friendly national representation of the phone number, for
// example, "+14105554092" is returned as "(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.
Local returns a friendly national representation of the phone number for example + 14105554092 is returned as ( 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 .