Skip to content

digenaldo/goric

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goric

Documentation Coverage Status Go Report Card CircleCI

A Library in Go for validation of Brazilian documents.

Installation

go get github.com/digenaldo/goric

Import

import (
	"github.com/digenaldo/goric"
)

Usage

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")
}

To do list

  • CPF
  • CNH
  • Título de Eleitor
  • PIS

References

API Methods

To see the full list of API methods check out the documentation on godoc.org