github.com/godaddy-x/freego@v1.0.156/zlog/zlog_arry.go (about) 1 package zlog 2 3 import ( 4 "go.uber.org/zap" 5 "time" 6 7 "go.uber.org/zap/zapcore" 8 ) 9 10 func Array(key string, val zapcore.ArrayMarshaler) zap.Field { 11 return zap.Array(key, val) 12 } 13 14 func Bools(key string, bs []bool) zap.Field { 15 return zap.Bools(key, bs) 16 } 17 18 func ByteStrings(key string, bss [][]byte) zap.Field { 19 return zap.ByteStrings(key, bss) 20 } 21 22 func Complex128s(key string, nums []complex128) zap.Field { 23 return zap.Complex128s(key, nums) 24 } 25 26 func Complex64s(key string, nums []complex64) zap.Field { 27 return zap.Complex64s(key, nums) 28 } 29 30 func Durations(key string, ds []time.Duration) zap.Field { 31 return zap.Durations(key, ds) 32 } 33 34 func Float64s(key string, nums []float64) zap.Field { 35 return zap.Float64s(key, nums) 36 } 37 38 func Float32s(key string, nums []float32) zap.Field { 39 return zap.Float32s(key, nums) 40 } 41 42 func Ints(key string, nums []int) zap.Field { 43 return zap.Ints(key, nums) 44 } 45 46 func Int64s(key string, nums []int64) zap.Field { 47 return zap.Int64s(key, nums) 48 } 49 50 func Int32s(key string, nums []int32) zap.Field { 51 return zap.Int32s(key, nums) 52 } 53 54 func Int16s(key string, nums []int16) zap.Field { 55 return zap.Int16s(key, nums) 56 } 57 58 func Int8s(key string, nums []int8) zap.Field { 59 return zap.Int8s(key, nums) 60 } 61 62 func Strings(key string, ss []string) zap.Field { 63 return zap.Strings(key, ss) 64 } 65 66 func Times(key string, ts []time.Time) zap.Field { 67 return zap.Times(key, ts) 68 } 69 70 func Uints(key string, nums []uint) zap.Field { 71 return zap.Uints(key, nums) 72 } 73 74 func Uint64s(key string, nums []uint64) zap.Field { 75 return zap.Uint64s(key, nums) 76 } 77 78 func Uint32s(key string, nums []uint32) zap.Field { 79 return zap.Uint32s(key, nums) 80 } 81 82 func Uint16s(key string, nums []uint16) zap.Field { 83 return zap.Uint16s(key, nums) 84 } 85 86 func Uint8s(key string, nums []uint8) zap.Field { 87 return zap.Uint8s(key, nums) 88 } 89 90 func Uintptrs(key string, us []uintptr) zap.Field { 91 return zap.Uintptrs(key, us) 92 } 93 94 func AddError(errs ...error) zap.Field { 95 return Errors("error", errs...) 96 } 97 98 func Errors(key string, errs ...error) zap.Field { 99 return zap.Errors(key, errs) 100 }