Closed haizaar closed 1 year ago
US and CA have the same country code, hence if you call GetISO3166ByNumber() with withLandline=true it will always return US even for Canadian mobile numbers - as per https://github.com/dongri/phonenumber/blob/master/phonenumber.go#L106
GetISO3166ByNumber()
withLandline=true
US
To fix this, I suggest the library code to be reworked to match the longest matching prefix of country_code+mobile_prefix.
Fixed by PR https://github.com/dongri/phonenumber/pull/29
@haizaar @dongri could you please close the issue?
US and CA have the same country code, hence if you call
GetISO3166ByNumber()
withwithLandline=true
it will always returnUS
even for Canadian mobile numbers - as per https://github.com/dongri/phonenumber/blob/master/phonenumber.go#L106To fix this, I suggest the library code to be reworked to match the longest matching prefix of country_code+mobile_prefix.