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
|
package _generated
import "encoding/json"
//go:generate msgp
//msgp:replace Any with:any
//msgp:replace MapString with:CompatibleMapString
//msgp:replace MapAny with:map[string]any
//msgp:replace SliceString with:[]string
//msgp:replace SliceInt with:CompatibleSliceInt
//msgp:replace Array8 with:CompatibleArray8
//msgp:replace Array16 with:[16]byte
//msgp:replace String with:string
//msgp:replace Int with:CompatibleInt
//msgp:replace Uint with:uint
//msgp:replace Float32 with:CompatibleFloat32
//msgp:replace Float64 with:CompatibleFloat64
//msgp:replace Time with:time.Time
//msgp:replace Duration with:time.Duration
//msgp:replace StructA with:CompatibleStructA
//msgp:replace StructB with:CompatibleStructB
//msgp:replace StructC with:CompatibleStructC
//msgp:replace StructD with:CompatibleStructD
//msgp:replace StructI with:CompatibleStructI
//msgp:replace StructS with:CompatibleStructS
type (
CompatibleMapString map[string]string
CompatibleArray8 [8]byte
CompatibleInt int
CompatibleFloat32 float32
CompatibleFloat64 float64
CompatibleSliceInt []Int
// Doesn't work
// CompatibleTime time.Time
CompatibleStructA struct {
StructB StructB
Int Int
}
CompatibleStructB struct {
StructC StructC
Any Any
Array8 Array8
}
CompatibleStructC struct {
StructD StructD
Float64 Float32
Float32 Float64
}
CompatibleStructD struct {
Time Time
Duration Duration
MapString MapString
}
CompatibleStructI struct {
Int *Int
Uint *Uint
}
CompatibleStructS struct {
Slice SliceInt
}
Dummy struct {
StructA StructA
StructI StructI
StructS StructS
Array16 Array16
Uint Uint
String String
}
)
//msgp:replace json.Number with:string
type NumberJSONSampleReplace struct {
Single json.Number
Array []json.Number
Map map[string]json.Number
}
|