github.com/galaxyobe/gen@v0.0.0-20220910125335-392fa8f0990f/cmd/deepcopy-gen/output_tests/aliases/deepcopy_generated.go (about) 1 //go:build !ignore_autogenerated 2 // +build !ignore_autogenerated 3 4 /* 5 Copyright The Kubernetes Authors. 6 7 Licensed under the Apache License, Version 2.0 (the "License"); 8 you may not use this file except in compliance with the License. 9 You may obtain a copy of the License at 10 11 http://www.apache.org/licenses/LICENSE-2.0 12 13 Unless required by applicable law or agreed to in writing, software 14 distributed under the License is distributed on an "AS IS" BASIS, 15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 See the License for the specific language governing permissions and 17 limitations under the License. 18 */ 19 20 // Code generated by ___deepcopy_gen. DO NOT EDIT. 21 22 package aliases 23 24 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. 25 func (in AliasInterfaceMap) DeepCopyInto(out *AliasInterfaceMap) { 26 { 27 in := &in 28 *out = make(AliasInterfaceMap, len(*in)) 29 for key, val := range *in { 30 if val == nil { 31 (*out)[key] = nil 32 } else { 33 (*out)[key] = val.DeepCopyAliasInterface() 34 } 35 } 36 return 37 } 38 } 39 40 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliasInterfaceMap. 41 func (in AliasInterfaceMap) DeepCopy() AliasInterfaceMap { 42 if in == nil { 43 return nil 44 } 45 out := new(AliasInterfaceMap) 46 in.DeepCopyInto(out) 47 return *out 48 } 49 50 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. 51 func (in AliasInterfaceSlice) DeepCopyInto(out *AliasInterfaceSlice) { 52 { 53 in := &in 54 *out = make(AliasInterfaceSlice, len(*in)) 55 for i := range *in { 56 if (*in)[i] != nil { 57 (*out)[i] = (*in)[i].DeepCopyAliasInterface() 58 } 59 } 60 return 61 } 62 } 63 64 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliasInterfaceSlice. 65 func (in AliasInterfaceSlice) DeepCopy() AliasInterfaceSlice { 66 if in == nil { 67 return nil 68 } 69 out := new(AliasInterfaceSlice) 70 in.DeepCopyInto(out) 71 return *out 72 } 73 74 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. 75 func (in AliasMap) DeepCopyInto(out *AliasMap) { 76 { 77 in := &in 78 *out = make(AliasMap, len(*in)) 79 for key, val := range *in { 80 (*out)[key] = val 81 } 82 return 83 } 84 } 85 86 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliasMap. 87 func (in AliasMap) DeepCopy() AliasMap { 88 if in == nil { 89 return nil 90 } 91 out := new(AliasMap) 92 in.DeepCopyInto(out) 93 return *out 94 } 95 96 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. 97 func (in AliasSlice) DeepCopyInto(out *AliasSlice) { 98 { 99 in := &in 100 *out = make(AliasSlice, len(*in)) 101 copy(*out, *in) 102 return 103 } 104 } 105 106 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliasSlice. 107 func (in AliasSlice) DeepCopy() AliasSlice { 108 if in == nil { 109 return nil 110 } 111 out := new(AliasSlice) 112 in.DeepCopyInto(out) 113 return *out 114 } 115 116 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. 117 func (in *AliasStruct) DeepCopyInto(out *AliasStruct) { 118 *out = *in 119 return 120 } 121 122 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AliasStruct. 123 func (in *AliasStruct) DeepCopy() *AliasStruct { 124 if in == nil { 125 return nil 126 } 127 out := new(AliasStruct) 128 in.DeepCopyInto(out) 129 return out 130 } 131 132 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. 133 func (in *Foo) DeepCopyInto(out *Foo) { 134 *out = *in 135 return 136 } 137 138 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Foo. 139 func (in *Foo) DeepCopy() *Foo { 140 if in == nil { 141 return nil 142 } 143 out := new(Foo) 144 in.DeepCopyInto(out) 145 return out 146 } 147 148 // DeepCopyAliasAliasInterface is an autogenerated deepcopy function, copying the receiver, creating a new AliasAliasInterface. 149 func (in *Foo) DeepCopyAliasAliasInterface() AliasAliasInterface { 150 if c := in.DeepCopy(); c != nil { 151 return c 152 } 153 return nil 154 } 155 156 // DeepCopyAliasInterface is an autogenerated deepcopy function, copying the receiver, creating a new AliasInterface. 157 func (in *Foo) DeepCopyAliasInterface() AliasInterface { 158 if c := in.DeepCopy(); c != nil { 159 return c 160 } 161 return nil 162 } 163 164 // DeepCopyInterface is an autogenerated deepcopy function, copying the receiver, creating a new Interface. 165 func (in *Foo) DeepCopyInterface() Interface { 166 if c := in.DeepCopy(); c != nil { 167 return c 168 } 169 return nil 170 } 171 172 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. 173 func (in *FooAlias) DeepCopyInto(out *FooAlias) { 174 *out = *in 175 return 176 } 177 178 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FooAlias. 179 func (in *FooAlias) DeepCopy() *FooAlias { 180 if in == nil { 181 return nil 182 } 183 out := new(FooAlias) 184 in.DeepCopyInto(out) 185 return out 186 } 187 188 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. 189 func (in FooMap) DeepCopyInto(out *FooMap) { 190 { 191 in := &in 192 *out = make(FooMap, len(*in)) 193 for key, val := range *in { 194 (*out)[key] = val 195 } 196 return 197 } 198 } 199 200 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FooMap. 201 func (in FooMap) DeepCopy() FooMap { 202 if in == nil { 203 return nil 204 } 205 out := new(FooMap) 206 in.DeepCopyInto(out) 207 return *out 208 } 209 210 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. 211 func (in FooSlice) DeepCopyInto(out *FooSlice) { 212 { 213 in := &in 214 *out = make(FooSlice, len(*in)) 215 copy(*out, *in) 216 return 217 } 218 } 219 220 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FooSlice. 221 func (in FooSlice) DeepCopy() FooSlice { 222 if in == nil { 223 return nil 224 } 225 out := new(FooSlice) 226 in.DeepCopyInto(out) 227 return *out 228 } 229 230 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. 231 func (in Map) DeepCopyInto(out *Map) { 232 { 233 in := &in 234 *out = make(Map, len(*in)) 235 for key, val := range *in { 236 (*out)[key] = val 237 } 238 return 239 } 240 } 241 242 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Map. 243 func (in Map) DeepCopy() Map { 244 if in == nil { 245 return nil 246 } 247 out := new(Map) 248 in.DeepCopyInto(out) 249 return *out 250 } 251 252 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. 253 func (in Slice) DeepCopyInto(out *Slice) { 254 { 255 in := &in 256 *out = make(Slice, len(*in)) 257 copy(*out, *in) 258 return 259 } 260 } 261 262 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Slice. 263 func (in Slice) DeepCopy() Slice { 264 if in == nil { 265 return nil 266 } 267 out := new(Slice) 268 in.DeepCopyInto(out) 269 return *out 270 } 271 272 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. 273 func (in *Struct) DeepCopyInto(out *Struct) { 274 *out = *in 275 return 276 } 277 278 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Struct. 279 func (in *Struct) DeepCopy() *Struct { 280 if in == nil { 281 return nil 282 } 283 out := new(Struct) 284 in.DeepCopyInto(out) 285 return out 286 } 287 288 // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. 289 func (in *Ttest) DeepCopyInto(out *Ttest) { 290 *out = *in 291 if in.Slice != nil { 292 in, out := &in.Slice, &out.Slice 293 *out = make(Slice, len(*in)) 294 copy(*out, *in) 295 } 296 if in.Pointer != nil { 297 in, out := &in.Pointer, &out.Pointer 298 *out = new(int) 299 **out = **in 300 } 301 if in.PointerAlias != nil { 302 in, out := &in.PointerAlias, &out.PointerAlias 303 *out = new(Builtin) 304 **out = **in 305 } 306 out.Struct = in.Struct 307 if in.Map != nil { 308 in, out := &in.Map, &out.Map 309 *out = make(Map, len(*in)) 310 for key, val := range *in { 311 (*out)[key] = val 312 } 313 } 314 if in.SliceSlice != nil { 315 in, out := &in.SliceSlice, &out.SliceSlice 316 *out = make([]Slice, len(*in)) 317 for i := range *in { 318 if (*in)[i] != nil { 319 in, out := &(*in)[i], &(*out)[i] 320 *out = make(Slice, len(*in)) 321 copy(*out, *in) 322 } 323 } 324 } 325 if in.MapSlice != nil { 326 in, out := &in.MapSlice, &out.MapSlice 327 *out = make(map[string]Slice, len(*in)) 328 for key, val := range *in { 329 var outVal []int 330 if val == nil { 331 (*out)[key] = nil 332 } else { 333 in, out := &val, &outVal 334 *out = make(Slice, len(*in)) 335 copy(*out, *in) 336 } 337 (*out)[key] = outVal 338 } 339 } 340 out.FooAlias = in.FooAlias 341 if in.FooSlice != nil { 342 in, out := &in.FooSlice, &out.FooSlice 343 *out = make(FooSlice, len(*in)) 344 copy(*out, *in) 345 } 346 if in.FooPointer != nil { 347 in, out := &in.FooPointer, &out.FooPointer 348 *out = new(Foo) 349 **out = **in 350 } 351 if in.FooMap != nil { 352 in, out := &in.FooMap, &out.FooMap 353 *out = make(FooMap, len(*in)) 354 for key, val := range *in { 355 (*out)[key] = val 356 } 357 } 358 if in.AliasSlice != nil { 359 in, out := &in.AliasSlice, &out.AliasSlice 360 *out = make(AliasSlice, len(*in)) 361 copy(*out, *in) 362 } 363 if in.AliasPointer != nil { 364 in, out := &in.AliasPointer, &out.AliasPointer 365 *out = new(int) 366 **out = **in 367 } 368 out.AliasStruct = in.AliasStruct 369 if in.AliasMap != nil { 370 in, out := &in.AliasMap, &out.AliasMap 371 *out = make(AliasMap, len(*in)) 372 for key, val := range *in { 373 (*out)[key] = val 374 } 375 } 376 if in.AliasInterface != nil { 377 out.AliasInterface = in.AliasInterface.DeepCopyAliasInterface() 378 } 379 if in.AliasAliasInterface != nil { 380 out.AliasAliasInterface = in.AliasAliasInterface.DeepCopyAliasAliasInterface() 381 } 382 if in.AliasInterfaceMap != nil { 383 in, out := &in.AliasInterfaceMap, &out.AliasInterfaceMap 384 *out = make(AliasInterfaceMap, len(*in)) 385 for key, val := range *in { 386 if val == nil { 387 (*out)[key] = nil 388 } else { 389 (*out)[key] = val.DeepCopyAliasInterface() 390 } 391 } 392 } 393 if in.AliasInterfaceSlice != nil { 394 in, out := &in.AliasInterfaceSlice, &out.AliasInterfaceSlice 395 *out = make(AliasInterfaceSlice, len(*in)) 396 for i := range *in { 397 if (*in)[i] != nil { 398 (*out)[i] = (*in)[i].DeepCopyAliasInterface() 399 } 400 } 401 } 402 return 403 } 404 405 // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ttest. 406 func (in *Ttest) DeepCopy() *Ttest { 407 if in == nil { 408 return nil 409 } 410 out := new(Ttest) 411 in.DeepCopyInto(out) 412 return out 413 }