Skip to content

Commit b1eb9e0

Browse files
committed
feat: function to get the end of the URL using the decomposed.TJ from github.com/DanielFillol/CNJ_Validate/CNJ
1 parent 8b85885 commit b1eb9e0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

request/api_define_tj.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package request
2+
3+
import (
4+
"github.com/DanielFillol/CNJ_Validate/CNJ"
5+
"strings"
6+
)
7+
8+
func defineTJ(cnjNumber string) (string, error) {
9+
CNJ.ValidateCNJ()
10+
decomposedCNJ, err := CNJ.DecomposeCNJ(cnjNumber)
11+
if err != nil {
12+
return "", err
13+
}
14+
15+
return strings.ToLower(decomposedCNJ.TJ), nil
16+
}

0 commit comments

Comments
 (0)