Skip to content

This is validator, generator and formats the brazil code as CPF and CNPJ

License

Notifications You must be signed in to change notification settings

estrategiahq/brazilcode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brazil-Code

This is validator, generator and formats the brazil code as CPF and CNPJ

Formats to use

  • CPF
  • CNPJ
  • CNH
  • VoterRegistration(Título de Eleitor)

Development

Import package with command in shell

$ go get github.com/estrategiahq/brazilcode

In code just use the function with import

Example:

package main

import (
	"fmt"

	"github.com/estrategiahq/brazilcode"
)

func main() {
	doc, err := brazilcode.CNPJGenerate()
	if err != nil {
		panic(err)
	}

	docFormatted, err := brazilcode.CNPJFormat(doc)
	if err != nil {
		panic(err)
	}

	fmt.Println(doc, docFormatted)
}

License

The MIT License © 2023 João Vitor Lima da Rocha

About

This is validator, generator and formats the brazil code as CPF and CNPJ

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%