-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathxutils.go
151 lines (128 loc) · 2.76 KB
/
xutils.go
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
package xutils
import (
"github.com/thiagozs/go-xutils/aes"
"github.com/thiagozs/go-xutils/bools"
"github.com/thiagozs/go-xutils/calc"
"github.com/thiagozs/go-xutils/cep"
"github.com/thiagozs/go-xutils/cnpj"
"github.com/thiagozs/go-xutils/convs"
"github.com/thiagozs/go-xutils/cpf"
"github.com/thiagozs/go-xutils/csv"
"github.com/thiagozs/go-xutils/email"
"github.com/thiagozs/go-xutils/files"
"github.com/thiagozs/go-xutils/geo"
"github.com/thiagozs/go-xutils/hash"
"github.com/thiagozs/go-xutils/ip"
"github.com/thiagozs/go-xutils/phone"
"github.com/thiagozs/go-xutils/rsa"
"github.com/thiagozs/go-xutils/slices"
"github.com/thiagozs/go-xutils/strings"
"github.com/thiagozs/go-xutils/structs"
"github.com/thiagozs/go-xutils/xls"
)
type XUtils struct {
calc *calc.Calc
cnpj *cnpj.CNPJ
email *email.Email
slices *slices.Slices
str *strings.Strings
hash *hash.Hash
rsa *rsa.RSA
rsaPem *rsa.RSAPem
aes *aes.AES
csv *csv.CSV
bools *bools.Bools
cpf *cpf.CPF
structs *structs.Structs
convs *convs.Convs
xls *xls.XLS
phone *phone.Phone
ip *ip.Ip
geo *geo.Geo
cep *cep.CEP
files *files.Files
}
func New() *XUtils {
return &XUtils{
slices: slices.New(strings.New()),
str: strings.New(),
calc: calc.New(),
cnpj: cnpj.New(),
email: email.New(),
hash: hash.New(),
rsa: rsa.New(),
rsaPem: rsa.NewPem(),
aes: aes.New(),
csv: csv.New(),
bools: bools.New(),
cpf: cpf.New(),
structs: structs.New(),
convs: convs.New(),
xls: xls.New(),
phone: phone.New(),
ip: ip.New(),
geo: geo.New(),
cep: cep.New(),
files: files.New(),
}
}
func (x *XUtils) Strings() *strings.Strings {
return x.str
}
func (x *XUtils) Slices() *slices.Slices {
return x.slices
}
func (x *XUtils) Calc() *calc.Calc {
return x.calc
}
func (x *XUtils) CNPJ() *cnpj.CNPJ {
return x.cnpj
}
func (x *XUtils) Email() *email.Email {
return x.email
}
func (x *XUtils) Hash() *hash.Hash {
return x.hash
}
func (x *XUtils) RSA() *rsa.RSA {
return x.rsa
}
func (x *XUtils) RSAPem() *rsa.RSAPem {
return x.rsaPem
}
func (x *XUtils) AES() *aes.AES {
return x.aes
}
func (x *XUtils) CSV() *csv.CSV {
return x.csv
}
func (x *XUtils) Bools() *bools.Bools {
return x.bools
}
func (x *XUtils) CPF() *cpf.CPF {
return x.cpf
}
func (x *XUtils) Structs() *structs.Structs {
return x.structs
}
func (x *XUtils) Convs() *convs.Convs {
return x.convs
}
func (x *XUtils) XLS() *xls.XLS {
return x.xls
}
func (x *XUtils) Phone() *phone.Phone {
return x.phone
}
func (x *XUtils) Ip() *ip.Ip {
return x.ip
}
func (x *XUtils) Geo() *geo.Geo {
return x.geo
}
func (x *XUtils) CEP() *cep.CEP {
return x.cep
}
func (x *XUtils) Files() *files.Files {
return x.files
}