A slice is a struct with fields:
type slice struct {
ptr *array
len int
cap int
}
The pointer points to the first element. Length is accessible elements. Capacity is available space. This struct is bytes on -bit systems.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Under the hood
A slice is a struct with fields:
type slice struct {
ptr *array
len int
cap int
}
The pointer points to the first element. Length is accessible elements. Capacity is available space. This struct is bytes on -bit systems.