···11-name: Tests
22-33-on: [pull_request, push]
44-55-jobs:
66-77- build:
88- name: Build
99- runs-on: ubuntu-latest
1010- steps:
1111-1212- - name: Set up Go 1.14
1313- uses: actions/setup-go@v1
1414- with:
1515- go-version: 1.14
1616- id: go
1717-1818- - name: Check out code into the Go module directory
1919- uses: actions/checkout@v2
2020-2121- - name: Get dependencies
2222- run: |
2323- go get -v -t -d ./...
2424- if [ -f Gopkg.toml ]; then
2525- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
2626- dep ensure
2727- fi
2828-2929- - name: Build
3030- run: go test
+16
.tangled/workflows/tests.yaml
···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 ./...
+4-4
README.md
···11-# Go CNPJ []()[](https://godoc.org/github.com/cuducos/go-cnpj)
11+# Go CNPJ [](https://godoc.org/tangled.org/cuducos.me/go-cnpj)
2233A Go module to validate CNPJ numbers (Brazilian companies' unique identifier for the Federal Revenue).
4455> [!IMPORTANT]
66-> 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).
66+> 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).
7788```go
99package main
10101111-import "github.com/cuducos/go-cnpj"
1111+import "tangled.org/cuducos.me/go-cnpj"
121213131414func main() {
···3434}
3535```
36363737-Based on [Go CPF](https://github.com/cuducos/go-cpf) ❤️
3737+Based on [Go CPF](https://tangled.org/cuducos.me/go-cpf) ❤️