Just use go get.
go get github.com/AmirSoleimani/IRValidator
And then just import the package into your own code.
import (
"github.com/AmirSoleimani/IRValidator/validate"
)
import (
"fmt"
iv "github.com/AmirSoleimani/IRValidator/validate"
)
func main() {
// CardNumber check
if err := iv.CardNumber("6221061049447982"); err != nil {
fmt.Println(err)
}
// NationalID check
if err := iv.NationalID("1111111111"); err != nil {
fmt.Println(err)
}
// IBAN check
if err := iv.IBAN("IR340570030280001175105001"); err != nil {
fmt.Println(err)
}
// MobilePhone check
if PhoneNumber, err := validate.MobilePhone("+989121111111"); err != nil {
fmt.Println(err)
} else {
fmt.Println(PhoneNumber)
}
}