go-docs

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2019 License: MIT

README

go-docs

CPF / CNPJ validator and generator written in Go.

Circle CI Build Status Coverage Status GoDoc

Usage

CPF

import "github.com/martinusso/go-docs/cpf"

Valid return a boolean

valid := cpf.Valid("08507460003")

AssertValid return a boolean and the error if any

valid, err := cpf.AssertValid("08507460003")

Generate return a random valid CPF

doc := cpf.Generate()
CNPJ

import "github.com/martinusso/go-docs/cnpj"

Valid return a boolean

valid := cnpj.Valid("34700442000162")

AssertValid return a boolean and the error if any

valid, err := cnpj.AssertValid("34700442000162")

Generate return a random valid CNPJ

doc := cnpj.Generate()

License

This software is open source, licensed under the The MIT License (MIT). See LICENSE for details.

Directories

Path Synopsis
Package cnpj contains validation and generation of CNPJ
Package cnpj contains validation and generation of CNPJ
Package cpf contains validation and generation of CPF
Package cpf contains validation and generation of CPF

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL