🇧🇷 CNPJ validation in Go

Moves to Tangled

+21 -36
-1
.github/FUNDING.yml
··· 1 - github: [cuducos]
-30
.github/workflows/tests.yml
··· 1 - name: Tests 2 - 3 - on: [pull_request, push] 4 - 5 - jobs: 6 - 7 - build: 8 - name: Build 9 - runs-on: ubuntu-latest 10 - steps: 11 - 12 - - name: Set up Go 1.14 13 - uses: actions/setup-go@v1 14 - with: 15 - go-version: 1.14 16 - id: go 17 - 18 - - name: Check out code into the Go module directory 19 - uses: actions/checkout@v2 20 - 21 - - name: Get dependencies 22 - run: | 23 - go get -v -t -d ./... 24 - if [ -f Gopkg.toml ]; then 25 - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh 26 - dep ensure 27 - fi 28 - 29 - - name: Build 30 - run: go test
+16
.tangled/workflows/tests.yaml
··· 1 + when: 2 + - event: ["push"] 3 + branch: ["main"] 4 + engine: "nixery" 5 + dependencies: 6 + nixpkgs: 7 + - gcc 8 + - go 9 + - golangci-lint 10 + steps: 11 + - name: Formatting 12 + command: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi 13 + - name: Linter 14 + command: golangci-lint run ./... 15 + - name: Tests 16 + command: go test -v -race ./...
+4 -4
README.md
··· 1 - # Go CNPJ [![Tests](https://github.com/cuducos/go-cnpj/workflows/Tests/badge.svg)]()[![GoDoc](https://godoc.org/github.com/cuducos/go-cnpj?status.svg)](https://godoc.org/github.com/cuducos/go-cnpj)![Go version](https://img.shields.io/github/go-mod/go-version/cuducos/go-cnpj) 1 + # Go CNPJ [![GoDoc](https://godoc.org/tangled.org/cuducos.me/go-cnpj?status.svg)](https://godoc.org/tangled.org/cuducos.me/go-cnpj)![Go version](https://img.shields.io/github/go-mod/go-version/cuducos/go-cnpj) 2 2 3 3 A Go module to validate CNPJ numbers (Brazilian companies' unique identifier for the Federal Revenue). 4 4 5 5 > [!IMPORTANT] 6 - > 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.1.1`](https://github.com/cuducos/go-cnpj/releases/tag/v0.1.1). 6 + > 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.1.1`](https://tangled.org/cuducos.me/go-cnpj/tree/v0.1.1). 7 7 8 8 ```go 9 9 package main 10 10 11 - import "github.com/cuducos/go-cnpj" 11 + import "tangled.org/cuducos.me/go-cnpj" 12 12 13 13 14 14 func main() { ··· 34 34 } 35 35 ``` 36 36 37 - Based on [Go CPF](https://github.com/cuducos/go-cpf) ❤️ 37 + Based on [Go CPF](https://tangled.org/cuducos.me/go-cpf) ❤️
+1 -1
go.mod
··· 1 - module github.com/cuducos/go-cnpj 1 + module tangled.org/cuducos.me/go-cnpj 2 2 3 3 go 1.14