Skip to content

Commit 8b85885

Browse files
committed
feat: function to remove "-" and "." from CNJ format number using github.com/Darklabel91/CNJ_Validate/CNJ
1 parent 97f2ba2 commit 8b85885

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

request/api_modifyCNJ.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package request
2+
3+
import (
4+
"github.com/Darklabel91/CNJ_Validate/CNJ"
5+
)
6+
7+
func modifyCNJ(cnjNumber string) (string, error) {
8+
decomposed, _ := CNJ.DecomposeCNJ(cnjNumber)
9+
newCNJ := decomposed.LawsuitNumber + decomposed.VerifyingDigit + decomposed.ProtocolYear + decomposed.Segment + decomposed.Court + decomposed.SourceUnit
10+
return newCNJ, nil
11+
}

0 commit comments

Comments
 (0)