(+)phonescript

Bulk Generate && Validate US Phone numbers

N|Solid

Installation

Install the package by doing get get:

go get github.com/slimdestro/phonenumber/phonescript

Two Methods that is exported and can be used in your module are:

GenerateNumbers(10000) 
ValidateNumbers("/path/to/csv_10K_records")  

Example

package main 

import (
	"flag"
	"fmt" 
	"github.com/slimdestro/phonenumber/phonescript"
)
var generateNumbersFlag string

func main(){
    flag.StringVar(&generateNumbersFlag, "o", "import", "100")
    flag.Parse()
    commandsArray := flag.Args()

	switch commandsArray[0] {
	case "generate":
		phonescript.GenerateNumbers(commandsArray[1])
		return
	case "import":
		phonescript.ValidateNumbers(commandsArray[1])
		return
	default:
		fmt.Println("Invalid output")
	}
}
 

Author

slimdestro(Mukul Mishra)

GitHub

View Github