interface{}
Explore
When set object is an interface{}
- Set object is an interface{}
- Use pointer to set object value is int / string / struct / slice
- Print kind / address / type / value
conclusion
- The
interface{}
is changed by each time setting, but the address is not changed.
for example
source
1 |
|