package
0.0.0-20240710092454-d40bdaea4b58
Repository: https://github.com/kdlug/go.git
Documentation: pkg.go.dev
# Packages
ss := []string{"banana", "apple", "kiwi"} updateSlice(s []string)
RAM Address | Variable | Value ------------------------------------------- | 0000 | | | | 0001 | ss | [len][cap][ptr]--------|--- | | 0002 | | []string{"banana",...} |<-- (underlying array) | | 0003 | s | [len][cap][ptr]--------|---
value types | reference types ----------------------------- int | slices float | maps string | channels bool | pointers struct | functions.
Pointers We gets a pointer to name called namePointer and prints out the memory address of the pointer itself! Then in the function, we take the pointer that was passed as an argument and print out the address of that pointer too.