From 4b53e3e3120b66bf7d9b934acffd83a112dba104 Mon Sep 17 00:00:00 2001 From: Vitor Rocha Date: Wed, 26 Mar 2025 15:23:54 -0300 Subject: [PATCH 1/3] feat: add pull request template to standardize submission process --- .github/PULL_REQUEST_TEMPLATE.md | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..b379eea --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,40 @@ +# Pull Request Description + +## Summary of Changes + +[Brief description of the changes introduced by this PR.] + +## Related Issue (if applicable) + +[Link to the related issue or a brief explanation of the problem this PR addresses.] + +## Type of Change + +Mark the type of change made: + +- [ ] Bugfix +- [ ] New Feature +- [ ] Performance Improvement +- [ ] Documentation +- [ ] Other: [specify] + +## Pre-merge Checklist + +Make sure to have done the following before submitting the pull request: + +- [ ] I have tested the changes locally and they are working as expected. +- [ ] I have added tests that demonstrate my solution is effective. +- [ ] I have updated the documentation as necessary. + +## Additional Comments + +[Add any additional comments or relevant information here.] + +## Is this a security-related request? + +- [ ] Yes +- [ ] No + +## Steps to Test (if applicable) + +[Provide detailed steps on how to review and test the changes made in this PR.] \ No newline at end of file From 3f8d39b2393bc89e59767c4c9a4965f8141f68a4 Mon Sep 17 00:00:00 2001 From: Vitor Rocha Date: Wed, 26 Mar 2025 15:44:31 -0300 Subject: [PATCH 2/3] ci: rename workflow go to test --- .github/workflows/{go.yml => test.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{go.yml => test.yml} (100%) diff --git a/.github/workflows/go.yml b/.github/workflows/test.yml similarity index 100% rename from .github/workflows/go.yml rename to .github/workflows/test.yml From 9e595afad5e679476d5460211d296de67591d51a Mon Sep 17 00:00:00 2001 From: Vitor Rocha Date: Wed, 26 Mar 2025 15:58:54 -0300 Subject: [PATCH 3/3] fix: update module path to v2 and adjust import statements --- brazilcode.go | 10 +++++----- brazilcode_test.go | 2 +- go.mod | 3 ++- src/cnh/cnh.go | 2 +- src/cnh/cnh_test.go | 2 +- src/cnpj/cnpj.go | 2 +- src/cnpj/cnpj_test.go | 2 +- src/cpf/cpf.go | 2 +- src/cpf/cpf_test.go | 2 +- src/utils/calculator_test.go | 2 +- src/utils/digit_test.go | 2 +- src/utils/text_test.go | 2 +- src/voterRegistration/voterRegistration.go | 2 +- src/voterRegistration/voterRegistration_test.go | 2 +- 14 files changed, 19 insertions(+), 18 deletions(-) diff --git a/brazilcode.go b/brazilcode.go index 262e7bb..519d38f 100644 --- a/brazilcode.go +++ b/brazilcode.go @@ -3,11 +3,11 @@ package brazilcode import ( "errors" - "github.com/potatowski/brazilcode/src/cnh" - "github.com/potatowski/brazilcode/src/cnpj" - "github.com/potatowski/brazilcode/src/cpf" - iface "github.com/potatowski/brazilcode/src/interface" - "github.com/potatowski/brazilcode/src/voterRegistration" + "github.com/potatowski/brazilcode/v2/src/cnh" + "github.com/potatowski/brazilcode/v2/src/cnpj" + "github.com/potatowski/brazilcode/v2/src/cpf" + iface "github.com/potatowski/brazilcode/v2/src/interface" + "github.com/potatowski/brazilcode/v2/src/voterRegistration" ) var CPF = cpf.CPF{} diff --git a/brazilcode_test.go b/brazilcode_test.go index 9a16da7..6c47972 100644 --- a/brazilcode_test.go +++ b/brazilcode_test.go @@ -3,7 +3,7 @@ package brazilcode_test import ( "testing" - "github.com/potatowski/brazilcode" + "github.com/potatowski/brazilcode/v2" ) func TestIsValid(t *testing.T) { diff --git a/go.mod b/go.mod index 6c23711..4896a8c 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,4 @@ -module github.com/potatowski/brazilcode +module github.com/potatowski/brazilcode/v2 + go 1.20 diff --git a/src/cnh/cnh.go b/src/cnh/cnh.go index 978305c..ed97eac 100644 --- a/src/cnh/cnh.go +++ b/src/cnh/cnh.go @@ -3,7 +3,7 @@ package cnh import ( "fmt" - "github.com/potatowski/brazilcode/src/utils" + "github.com/potatowski/brazilcode/v2/src/utils" ) var ( diff --git a/src/cnh/cnh_test.go b/src/cnh/cnh_test.go index 0596c05..87303cd 100644 --- a/src/cnh/cnh_test.go +++ b/src/cnh/cnh_test.go @@ -3,7 +3,7 @@ package cnh import ( "testing" - iface "github.com/potatowski/brazilcode/src/interface" + iface "github.com/potatowski/brazilcode/v2/src/interface" ) var doc iface.Document = CNH{} diff --git a/src/cnpj/cnpj.go b/src/cnpj/cnpj.go index 93982de..71d55db 100644 --- a/src/cnpj/cnpj.go +++ b/src/cnpj/cnpj.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/potatowski/brazilcode/src/utils" + "github.com/potatowski/brazilcode/v2/src/utils" ) var ( diff --git a/src/cnpj/cnpj_test.go b/src/cnpj/cnpj_test.go index 59b6681..eb03635 100644 --- a/src/cnpj/cnpj_test.go +++ b/src/cnpj/cnpj_test.go @@ -3,7 +3,7 @@ package cnpj import ( "testing" - iface "github.com/potatowski/brazilcode/src/interface" + iface "github.com/potatowski/brazilcode/v2/src/interface" ) var doc iface.Document = CNPJ{} diff --git a/src/cpf/cpf.go b/src/cpf/cpf.go index 5587f45..94d3908 100644 --- a/src/cpf/cpf.go +++ b/src/cpf/cpf.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/potatowski/brazilcode/src/utils" + "github.com/potatowski/brazilcode/v2/src/utils" ) var ( diff --git a/src/cpf/cpf_test.go b/src/cpf/cpf_test.go index ef419ab..da22262 100644 --- a/src/cpf/cpf_test.go +++ b/src/cpf/cpf_test.go @@ -3,7 +3,7 @@ package cpf import ( "testing" - iface "github.com/potatowski/brazilcode/src/interface" + iface "github.com/potatowski/brazilcode/v2/src/interface" ) var doc iface.Document = CPF{} diff --git a/src/utils/calculator_test.go b/src/utils/calculator_test.go index 4b20259..98b5e36 100644 --- a/src/utils/calculator_test.go +++ b/src/utils/calculator_test.go @@ -3,7 +3,7 @@ package utils_test import ( "testing" - "github.com/potatowski/brazilcode/src/utils" + "github.com/potatowski/brazilcode/v2/src/utils" ) func TestCalculator(t *testing.T) { diff --git a/src/utils/digit_test.go b/src/utils/digit_test.go index 6d05b4b..4e0a3ec 100644 --- a/src/utils/digit_test.go +++ b/src/utils/digit_test.go @@ -3,7 +3,7 @@ package utils_test import ( "testing" - "github.com/potatowski/brazilcode/src/utils" + "github.com/potatowski/brazilcode/v2/src/utils" ) func TestGetDigit(t *testing.T) { diff --git a/src/utils/text_test.go b/src/utils/text_test.go index 90c2b24..6782b39 100644 --- a/src/utils/text_test.go +++ b/src/utils/text_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/potatowski/brazilcode/src/utils" + "github.com/potatowski/brazilcode/v2/src/utils" ) func TestRemoveChar(t *testing.T) { diff --git a/src/voterRegistration/voterRegistration.go b/src/voterRegistration/voterRegistration.go index 6f2b755..0eef990 100644 --- a/src/voterRegistration/voterRegistration.go +++ b/src/voterRegistration/voterRegistration.go @@ -4,7 +4,7 @@ import ( "errors" "fmt" - "github.com/potatowski/brazilcode/src/utils" + "github.com/potatowski/brazilcode/v2/src/utils" ) var ufToCode = map[string]string{ diff --git a/src/voterRegistration/voterRegistration_test.go b/src/voterRegistration/voterRegistration_test.go index 2289ada..7b9a158 100644 --- a/src/voterRegistration/voterRegistration_test.go +++ b/src/voterRegistration/voterRegistration_test.go @@ -3,7 +3,7 @@ package voterRegistration import ( "testing" - iface "github.com/potatowski/brazilcode/src/interface" + iface "github.com/potatowski/brazilcode/v2/src/interface" ) var doc iface.Document = VoterRegistration{}