/
array.go
112 lines (90 loc) · 3.14 KB
/
array.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
package field
import (
"go.uber.org/zap"
"time"
)
// Bools constructs a field that carries a slice of bools.
func Bools(key string, bs []bool) Field {
return zap.Bools(key, bs)
}
// ByteStrings constructs a field that carries a slice of []byte, each of which
// must be UTF-8 encoded text.
func ByteStrings(key string, bss [][]byte) Field {
return zap.ByteStrings(key, bss)
}
// Complex128s constructs a field that carries a slice of complex numbers.
func Complex128s(key string, nums []complex128) Field {
return zap.Complex128s(key, nums)
}
// Complex64s constructs a field that carries a slice of complex numbers.
func Complex64s(key string, nums []complex64) Field {
return zap.Complex64s(key, nums)
}
// Durations constructs a field that carries a slice of time.Durations.
func Durations(key string, ds []time.Duration) Field {
return zap.Durations(key, ds)
}
// Float64s constructs a field that carries a slice of floats.
func Float64s(key string, nums []float64) Field {
return zap.Float64s(key, nums)
}
// Float32s constructs a field that carries a slice of floats.
func Float32s(key string, nums []float32) Field {
return zap.Float32s(key, nums)
}
// Ints constructs a field that carries a slice of integers.
func Ints(key string, nums []int) Field {
return zap.Ints(key, nums)
}
// Int64s constructs a field that carries a slice of integers.
func Int64s(key string, nums []int64) Field {
return zap.Int64s(key, nums)
}
// Int32s constructs a field that carries a slice of integers.
func Int32s(key string, nums []int32) Field {
return zap.Int32s(key, nums)
}
// Int16s constructs a field that carries a slice of integers.
func Int16s(key string, nums []int16) Field {
return zap.Int16s(key, nums)
}
// Int8s constructs a field that carries a slice of integers.
func Int8s(key string, nums []int8) Field {
return zap.Int8s(key, nums)
}
// Strings constructs a field that carries a slice of strings.
func Strings(key string, ss []string) Field {
return zap.Strings(key, ss)
}
// Times constructs a field that carries a slice of time.Times.
func Times(key string, ts []time.Time) Field {
return zap.Times(key, ts)
}
// Uints constructs a field that carries a slice of unsigned integers.
func Uints(key string, nums []uint) Field {
return zap.Uints(key, nums)
}
// Uint64s constructs a field that carries a slice of unsigned integers.
func Uint64s(key string, nums []uint64) Field {
return zap.Uint64s(key, nums)
}
// Uint32s constructs a field that carries a slice of unsigned integers.
func Uint32s(key string, nums []uint32) Field {
return zap.Uint32s(key, nums)
}
// Uint16s constructs a field that carries a slice of unsigned integers.
func Uint16s(key string, nums []uint16) Field {
return zap.Uint16s(key, nums)
}
// Uint8s constructs a field that carries a slice of unsigned integers.
func Uint8s(key string, nums []uint8) Field {
return zap.Uint8s(key, nums)
}
// Uintptrs constructs a field that carries a slice of pointer addresses.
func Uintptrs(key string, us []uintptr) Field {
return zap.Uintptrs(key, us)
}
// Errors constructs a field that carries a slice of errors.
func Errors(key string, errs []error) Field {
return zap.Errors(key, errs)
}