My question is, is it possible to alter the function to add this "prefix" as an extra return value? It's a requirement in a project I'm working on where the prefix is needed rather than the carrier name. For example:
func getValueForNumber(...) (string, int, error) { // int is for the prefix/index
~I'm happy to create a PR for it if this looks like a good addition to this package.~ I went ahead and created one.
GetCarrierForNumber
tries to guess the name of the carrier of a given number. In its implementation, it callsgetValueForNumber
which in turn attempts to find the "prefix" (orindex
) of the provided number that exists incarrierMapData
.My question is, is it possible to alter the function to add this "prefix" as an extra return value? It's a requirement in a project I'm working on where the prefix is needed rather than the carrier name. For example:
~I'm happy to create a PR for it if this looks like a good addition to this package.~ I went ahead and created one.