Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
kardolus
GitHub Repository: kardolus/chatgpt-cli
Path: blob/main/vendor/github.com/spf13/cast/zz_generated.go
2875 views
1
// Code generated by cast generator. DO NOT EDIT.
2
3
package cast
4
5
import "time"
6
7
// ToBool casts any value to a(n) bool type.
8
func ToBool(i any) bool {
9
v, _ := ToBoolE(i)
10
return v
11
}
12
13
// ToString casts any value to a(n) string type.
14
func ToString(i any) string {
15
v, _ := ToStringE(i)
16
return v
17
}
18
19
// ToTime casts any value to a(n) time.Time type.
20
func ToTime(i any) time.Time {
21
v, _ := ToTimeE(i)
22
return v
23
}
24
25
// ToTimeInDefaultLocation casts any value to a(n) time.Time type.
26
func ToTimeInDefaultLocation(i any, location *time.Location) time.Time {
27
v, _ := ToTimeInDefaultLocationE(i, location)
28
return v
29
}
30
31
// ToDuration casts any value to a(n) time.Duration type.
32
func ToDuration(i any) time.Duration {
33
v, _ := ToDurationE(i)
34
return v
35
}
36
37
// ToInt casts any value to a(n) int type.
38
func ToInt(i any) int {
39
v, _ := ToIntE(i)
40
return v
41
}
42
43
// ToInt8 casts any value to a(n) int8 type.
44
func ToInt8(i any) int8 {
45
v, _ := ToInt8E(i)
46
return v
47
}
48
49
// ToInt16 casts any value to a(n) int16 type.
50
func ToInt16(i any) int16 {
51
v, _ := ToInt16E(i)
52
return v
53
}
54
55
// ToInt32 casts any value to a(n) int32 type.
56
func ToInt32(i any) int32 {
57
v, _ := ToInt32E(i)
58
return v
59
}
60
61
// ToInt64 casts any value to a(n) int64 type.
62
func ToInt64(i any) int64 {
63
v, _ := ToInt64E(i)
64
return v
65
}
66
67
// ToUint casts any value to a(n) uint type.
68
func ToUint(i any) uint {
69
v, _ := ToUintE(i)
70
return v
71
}
72
73
// ToUint8 casts any value to a(n) uint8 type.
74
func ToUint8(i any) uint8 {
75
v, _ := ToUint8E(i)
76
return v
77
}
78
79
// ToUint16 casts any value to a(n) uint16 type.
80
func ToUint16(i any) uint16 {
81
v, _ := ToUint16E(i)
82
return v
83
}
84
85
// ToUint32 casts any value to a(n) uint32 type.
86
func ToUint32(i any) uint32 {
87
v, _ := ToUint32E(i)
88
return v
89
}
90
91
// ToUint64 casts any value to a(n) uint64 type.
92
func ToUint64(i any) uint64 {
93
v, _ := ToUint64E(i)
94
return v
95
}
96
97
// ToFloat32 casts any value to a(n) float32 type.
98
func ToFloat32(i any) float32 {
99
v, _ := ToFloat32E(i)
100
return v
101
}
102
103
// ToFloat64 casts any value to a(n) float64 type.
104
func ToFloat64(i any) float64 {
105
v, _ := ToFloat64E(i)
106
return v
107
}
108
109
// ToStringMapString casts any value to a(n) map[string]string type.
110
func ToStringMapString(i any) map[string]string {
111
v, _ := ToStringMapStringE(i)
112
return v
113
}
114
115
// ToStringMapStringSlice casts any value to a(n) map[string][]string type.
116
func ToStringMapStringSlice(i any) map[string][]string {
117
v, _ := ToStringMapStringSliceE(i)
118
return v
119
}
120
121
// ToStringMapBool casts any value to a(n) map[string]bool type.
122
func ToStringMapBool(i any) map[string]bool {
123
v, _ := ToStringMapBoolE(i)
124
return v
125
}
126
127
// ToStringMapInt casts any value to a(n) map[string]int type.
128
func ToStringMapInt(i any) map[string]int {
129
v, _ := ToStringMapIntE(i)
130
return v
131
}
132
133
// ToStringMapInt64 casts any value to a(n) map[string]int64 type.
134
func ToStringMapInt64(i any) map[string]int64 {
135
v, _ := ToStringMapInt64E(i)
136
return v
137
}
138
139
// ToStringMap casts any value to a(n) map[string]any type.
140
func ToStringMap(i any) map[string]any {
141
v, _ := ToStringMapE(i)
142
return v
143
}
144
145
// ToSlice casts any value to a(n) []any type.
146
func ToSlice(i any) []any {
147
v, _ := ToSliceE(i)
148
return v
149
}
150
151
// ToBoolSlice casts any value to a(n) []bool type.
152
func ToBoolSlice(i any) []bool {
153
v, _ := ToBoolSliceE(i)
154
return v
155
}
156
157
// ToStringSlice casts any value to a(n) []string type.
158
func ToStringSlice(i any) []string {
159
v, _ := ToStringSliceE(i)
160
return v
161
}
162
163
// ToIntSlice casts any value to a(n) []int type.
164
func ToIntSlice(i any) []int {
165
v, _ := ToIntSliceE(i)
166
return v
167
}
168
169
// ToInt64Slice casts any value to a(n) []int64 type.
170
func ToInt64Slice(i any) []int64 {
171
v, _ := ToInt64SliceE(i)
172
return v
173
}
174
175
// ToUintSlice casts any value to a(n) []uint type.
176
func ToUintSlice(i any) []uint {
177
v, _ := ToUintSliceE(i)
178
return v
179
}
180
181
// ToFloat64Slice casts any value to a(n) []float64 type.
182
func ToFloat64Slice(i any) []float64 {
183
v, _ := ToFloat64SliceE(i)
184
return v
185
}
186
187
// ToDurationSlice casts any value to a(n) []time.Duration type.
188
func ToDurationSlice(i any) []time.Duration {
189
v, _ := ToDurationSliceE(i)
190
return v
191
}
192
193
// ToBoolSliceE casts any value to a(n) []bool type.
194
func ToBoolSliceE(i any) ([]bool, error) {
195
return toSliceE[bool](i)
196
}
197
198
// ToDurationSliceE casts any value to a(n) []time.Duration type.
199
func ToDurationSliceE(i any) ([]time.Duration, error) {
200
return toSliceE[time.Duration](i)
201
}
202
203
// ToIntSliceE casts any value to a(n) []int type.
204
func ToIntSliceE(i any) ([]int, error) {
205
return toSliceE[int](i)
206
}
207
208
// ToInt8SliceE casts any value to a(n) []int8 type.
209
func ToInt8SliceE(i any) ([]int8, error) {
210
return toSliceE[int8](i)
211
}
212
213
// ToInt16SliceE casts any value to a(n) []int16 type.
214
func ToInt16SliceE(i any) ([]int16, error) {
215
return toSliceE[int16](i)
216
}
217
218
// ToInt32SliceE casts any value to a(n) []int32 type.
219
func ToInt32SliceE(i any) ([]int32, error) {
220
return toSliceE[int32](i)
221
}
222
223
// ToInt64SliceE casts any value to a(n) []int64 type.
224
func ToInt64SliceE(i any) ([]int64, error) {
225
return toSliceE[int64](i)
226
}
227
228
// ToUintSliceE casts any value to a(n) []uint type.
229
func ToUintSliceE(i any) ([]uint, error) {
230
return toSliceE[uint](i)
231
}
232
233
// ToUint8SliceE casts any value to a(n) []uint8 type.
234
func ToUint8SliceE(i any) ([]uint8, error) {
235
return toSliceE[uint8](i)
236
}
237
238
// ToUint16SliceE casts any value to a(n) []uint16 type.
239
func ToUint16SliceE(i any) ([]uint16, error) {
240
return toSliceE[uint16](i)
241
}
242
243
// ToUint32SliceE casts any value to a(n) []uint32 type.
244
func ToUint32SliceE(i any) ([]uint32, error) {
245
return toSliceE[uint32](i)
246
}
247
248
// ToUint64SliceE casts any value to a(n) []uint64 type.
249
func ToUint64SliceE(i any) ([]uint64, error) {
250
return toSliceE[uint64](i)
251
}
252
253
// ToFloat32SliceE casts any value to a(n) []float32 type.
254
func ToFloat32SliceE(i any) ([]float32, error) {
255
return toSliceE[float32](i)
256
}
257
258
// ToFloat64SliceE casts any value to a(n) []float64 type.
259
func ToFloat64SliceE(i any) ([]float64, error) {
260
return toSliceE[float64](i)
261
}
262
263