A Library in Go for validation of Brazilian documents.
go get github.com/digenaldo/goric
import (
"github.com/digenaldo/goric"
)
package main
import (
"github.com/digenaldo/goric"
)
func main() {
//returns if cpf is valid
b, err := goric.CpfIsValid("89576827086")
//returns if cpf size is valid
b1 := goric.CpfSizeIsValid("89576827086")
//verifies that the CPF digits are valid
b2 := goric.CpfDigitsValid("89576827086")
}
- CPF
- CNH
- Título de Eleitor
- PIS
To see the full list of API methods check out the documentation on godoc.org