Updating slice after passing to function in Go
I want to use defer in Go while also updating the list I am passing in the function itself.
Dereferencing pointers in a slice does not seem to yield the initial value that the pointer was created from
I need to make a slice of pointers for a Go project I’m working on, that references the items in a slice. The expected behavior would be that I could modify one of the dereferenced items in the slice of pointers, and that would modify the original item in the normal list that it is pointing to. Modifying the original items would also be expected to show as the new value when dereferencing the pointers in the slice. However neither of these behaviors seem to work.