You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-16Lines changed: 23 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,40 +33,47 @@ import (
33
33
34
34
func main() {
35
35
36
-
cnj := "1004144-88.2020.8.01.0037"
36
+
cnj := "0001327-64.2018.8.26.0158"
37
37
38
38
//Returns true if the CNJ is valid and the validation digit that it should have
39
-
bCNJ, nvd := Functions.ValidateCNJ(cnj)
39
+
bCNJ, _ := Functions.ValidateCNJ(cnj)
40
+
fmt.Println(bCNJ)
40
41
41
42
//Returns the valid CNJ in string format
42
43
vCNJ := Functions.ReturnValidCNJ(cnj)
44
+
fmt.Println(vCNJ)
43
45
44
-
//Returns a complex struct "AnalysisCNJ" with all the data in CNJ format
45
-
//returns error if any step of the verification is faulted
46
+
//Returns a complex struct "AnalysisCNJ" with all the data in CNJ format ; returns error if any step of the verification is faulted
46
47
aCNJ, err := CNJ_Validate.AnalyzeCNJ(cnj)
47
48
Error.CheckError(err)
49
+
fmt.Println(aCNJ)
48
50
49
51
//Returns an organized string of all cnj attributes
50
52
cnjW := CNJ_Validate.CNJWrite(aCNJ)
51
-
52
-
fmt.Println("O CNJ existe?", bCNJ)
53
-
fmt.Println("O dígito verificador correto:", nvd)
54
-
fmt.Println("O CNJ correto seria:", vCNJ)
55
-
fmt.Println("O cnj analisado:", aCNJ)
56
-
57
53
fmt.Println(cnjW)
58
-
54
+
55
+
//Returns a CSV File with the structured cnj analysis
56
+
raw := "/Users/Desktop/test.csv"
57
+
sp := ','
58
+
resultF := "TestFolder"
59
+
60
+
CNJ_Validate.AnalyzeCNJCSV(raw, sp, resultF)
61
+
59
62
}
60
63
64
+
61
65
```
62
66
Output
63
67
```
64
-
O CNJ existe? false
65
-
O dígito verificador correto: 84
66
-
O CNJ correto seria: 1004144-84.2020.8.01.0037
67
-
O cnj analisado: {1004144-88.2020.8.01.0037 false 1004144-84.2020.8.01.0037 84 Justiça dos Estados e do Distrito Federal e Territórios Justiça Comum foro de tramitação 0037 unidade federativa 1 {1004144 88 2020 8 01 0037 10041442020801003700}}
68
+
true
69
+
70
+
0001327-64.2018.8.26.0158
71
+
72
+
{0001327-64.2018.8.26.0158 true 0001327-64.2018.8.26.0158 64 Justiça dos Estados e do Distrito Federal e Territórios Justiça Comum foro 0158 unidade federativa 26 {0001327 64 2018 8 26 0158 00013272018826015800 São Paulo São Paulo}}
73
+
74
+
Processo número: 0001327, protocolado no foro de São Paulo, no ano 2018 | unidade federativa: São Paulo | Justiça dos Estados e do Distrito Federal e Territórios (Justiça Comum)
68
75
69
-
Processo número: 1004144, ajuizado no ano de 2020, pertencente ao segmento da Justiça dos Estados e do Distrito Federal e Territórios (Justiça Comum), tendo como unidade de origem: foro de tramitação: 0037 | unidade federativa: 1
0 commit comments