[Solved] Weird behavior using interface parameters


It is because a slice is already a pointer (https://golang.org/ref/spec#Slice_types).

So to set a pointer to a slice is setting a pointer to a pointer. So just remeber if you are dealing with slices they are pointers to arrays.

More information how the slices are used as a pointer are here: https://golang.org/doc/effective_go.html#slices

solved Weird behavior using interface parameters