golang-data-structure
bool alias for uint8
golang-data-structure
float32 == float (in C lang)
float64 == double (in C lang)
golang-data-structure
uint, int, uintptr --bit count decided by cpu and compiler
golang-data-structure
golang-data-structure
Array types is always transfered by value, not reference, copy the all elements of array
golang-data-structure
Slice types will be transfered by reference, not value, like alias, don’t copy, many slices may point to the same array which they are underlying, when the cap(slice) change, you should get the new slice from the new underlying array, and the old slices still point to the old array, not the new array. The old slices is invalid for using. So getting the new slice first when you change the cap(slice).
golang-data-structure
golang-data-structure

相关文章: