This Go project is designed to process a CSV file containing phone numbers and their associated providers. It identifies ranges of consecutive phone numbers for each provider and outputs the results into a new CSV file. The output includes the start and end of each range, the provider's name, and the length of the range.
- Reads phone numbers and providers from a CSV file.
- Identifies consecutive number ranges for each provider.
- Outputs the ranges to a new CSV file with range details.
- Handles large datasets efficiently.
- Go (version 1.15 or later) if you want to run the program from source.
if you want to run the program from source :
- Clone the repository to your local machine:
git clone https://github.com/fetristan/phone-number-range-finder-by-provider.git
cd phone-number-range-finder-by-provider
Else, download the latest release from the releases page.
- Place your input CSV file in the project directory as did.csv. Ensure it follows the format
number;provider
. - Run the program:
- From source :
go run main.go
- From binary : Execute the binary file.
- Check the generated
ranges_export.csv
in the project directory for the output.
The input CSV file should have the following format:
number;provider
number;provider
...
Example:
33123456789;orange
33987654321;sfr
...
The output CSV file will have the following columns:
Start
: Starting number of the range.End
: Ending number of the range.Provider
: Provider name.Range Length
: Number of phone numbers in the range.
Contributions to this project are welcome. Please ensure to update tests as appropriate.