-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidgen.go
More file actions
46 lines (40 loc) · 1008 Bytes
/
validgen.go
File metadata and controls
46 lines (40 loc) · 1008 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package validgen
import "github.com/Hublastt/ValidGen/cmd/cpf"
/*
ValidateCpf - Validate cpf is valid
- @param {string} - cpf
- @return {error} - error
*/
func ValidateCPF(cpfString string) error {
return cpf.CPFFunctions{}.ValidateCPF(cpfString)
}
/*
GenerateCpf - Generate a valid cpf
- @return {string, error} - cpf, error
*/
func GenerateCPF() (string, error) {
return cpf.CPFFunctions{}.GenerateCPF()
}
/*
FormatCpf - Format cpf
- @param {string} - cpf
- @return {string, error} - cpf, error
*/
func FormatCPF(cpfString string) (string, error) {
return cpf.CPFFunctions{}.FormatCPF(cpfString)
}
/*
UnformatCpf - Unformat cpf
- @param {string} - cpf
- @return {string, error} - cpf, error
*/
func UnformatCPF(cpfString string) (string, error) {
return cpf.CPFFunctions{}.UnformatCPF(cpfString)
}
/*
FormatGeneratedCpf - Format generated cpf
- @return {string, error} - cpf, error
*/
func FormatGeneratedCPF() (string, error) {
return cpf.CPFFunctions{}.FormatGeneratedCPF()
}