···11+when:
22+ - event: ["push"]
33+ branch: ["main"]
44+engine: "nixery"
55+dependencies:
66+ nixpkgs:
77+ - gcc
88+ - go
99+ - golangci-lint
1010+steps:
1111+ - name: Formatting
1212+ command: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
1313+ - name: Linter
1414+ command: golangci-lint run ./...
1515+ - name: Tests
1616+ command: go test -v -race ./...
+5-4
README.md
···11-# Go CNPF []() [](https://godoc.org/github.com/cuducos/go-cnpf) 
11+# Go CNPF [](https://godoc.org/tangled.org/cuducos.me/go-cnpf)
2233A Go module to validate CPF and CNPJ numbers (Brazilian people and companies unique identifier for the Federal Revenue).
44···77```go
88package main
991010-import "github.com/cuducos/go-cnpf"
1010+import "tangled.org/cuducos.me/go-cnpf"
111112121313func main() {
···3939 cnpj.Mask("12ABC34501DE35")
4040}
4141```
4242+4243> [!IMPORTANT]
4343-> Starting in July 2026 [the CNPJ number will be alphanumeric](https://www.gov.br/receitafederal/pt-br/acesso-a-informacao/acoes-e-programas/programas-e-atividades/cnpj-alfanumerico). This package **already supports the new format**. If you **do not** want to support the new format, tag this package to [`v0.0.1`](https://github.com/cuducos/go-cnpf/releases/tag/v0.0.1).
4444+> Starting in July 2026 [the CNPJ number will be alphanumeric](https://www.gov.br/receitafederal/pt-br/acesso-a-informacao/acoes-e-programas/programas-e-atividades/cnpj-alfanumerico). This package **already supports the new format**. If you **do not** want to support the new format, tag this package to `v0.0.1`.
44454545-Based on [Go CPF](https://github.com/cuducos/go-cpf) and [Go CNPJ](https://github.com/cuducos/go-cnpj) ❤️
4646+Based on [Go CPF](https://tangled.org/cuducos.me/go-cpf) and [Go CNPJ](https://tangled.org/cuducos.me/go-cnpj) ❤️
+2-2
cnpf.go
···11package cnpf
2233import (
44- cnpj "github.com/cuducos/go-cnpj"
55- cpf "github.com/cuducos/go-cpf"
44+ cnpj "tangled.org/cuducos.me/go-cnpj"
55+ cpf "tangled.org/cuducos.me/go-cpf"
66)
7788// Unmask removes any non-alphanumeric character (like punctuation) from a CPF