4 ms·
>If A and B are structs (not official PL/I terminology), then A + B A = B copies similarly named fields of B to corresponding fields in A. In Go, you can copy
by kgeist 5y ago
>If A and B are structs (not official PL/I terminology), then A + B A = B copies similarly named fields of B to corresponding fields in A.
In Go, you can copy a variable of type A to a variable of type B if the types have similarly named fields of same types, although an explicit cast is required.