github.com/hedzr/evendeep@v0.4.8/00_common_ds_for_test.go (about) 1 package evendeep 2 3 import ( 4 "bytes" 5 "time" 6 "unsafe" 7 8 "github.com/hedzr/evendeep/typ" 9 ) 10 11 // Employee type for testing 12 type Employee struct { 13 Name string `copy:",std"` 14 Birthday *time.Time 15 F11 float32 16 F12 float64 17 C11 complex64 18 C12 complex128 19 Feat []byte 20 Sptr *string 21 Nickname *string 22 Age int64 23 FakeAge int 24 EmployeID int64 25 DoubleAge int32 26 SuperRule string 27 Notes []string 28 RetryU uint8 29 TimesU uint16 30 FxReal uint32 31 FxTime int64 32 FxTimeU uint64 33 UxA uint 34 UxB int 35 Retry int8 36 Times int16 37 Born *int 38 BornU *uint 39 flags []byte //nolint:unused,structcheck //test 40 Bool1 bool 41 Bool2 bool 42 Ro []int 43 Zignored01 typ.Any `copy:"-"` 44 } 45 46 // X0 type for testing 47 type X0 struct{} 48 49 // X1 type for testing 50 type X1 struct { 51 A uintptr 52 B map[string]typ.Any 53 C bytes.Buffer 54 D []string 55 E []*X0 56 F chan struct{} 57 G chan bool 58 H chan int 59 I func() 60 J typ.Any 61 K *X0 62 L unsafe.Pointer 63 M unsafe.Pointer 64 N []int 65 O [2]string 66 P [2]string 67 Q [2]string 68 Zignored01 typ.Any `copy:"-"` 69 } 70 71 // X2 type for testing 72 type X2 struct { 73 A uintptr 74 B map[string]typ.Any 75 C bytes.Buffer 76 D []string 77 E []*X0 78 F chan struct{} 79 G chan bool 80 H chan int 81 I func() 82 J interface{} 83 K *X0 84 L unsafe.Pointer 85 M unsafe.Pointer 86 N []int `copy:",slicemerge"` 87 O [2]string 88 P [2]string 89 Q [3]string `copy:",slicecopy"` 90 Zignored01 typ.Any `copy:"-"` 91 Zignored02 typ.Any `copy:"-"` 92 } 93 94 // Attr _ 95 type Attr struct { 96 Attrs []string `copy:",slicemerge"` 97 } 98 99 // Base _ 100 type Base struct { 101 Name string 102 Birthday *time.Time 103 Age int 104 EmployeID int64 105 } 106 107 // Employee2 _ 108 type Employee2 struct { 109 Base 110 Avatar string 111 Image []byte 112 Attr *Attr 113 Valid bool 114 Deleted bool 115 } 116 117 // User _ 118 type User struct { 119 Name string 120 Birthday *time.Time 121 Age int 122 EmployeID int64 123 Avatar string 124 Image []byte 125 Attr *Attr 126 Valid bool 127 Deleted bool 128 }