Today I Learned: Pass By Reference on Interface Parameter in #golang
▻https://hackernoon.com/today-i-learned-pass-by-reference-on-interface-parameter-in-golang-35ee8
Pass Interface Parameters by Reference in GolangA simple diary about a simple thing that I learned about Pass By Reference in Golangpass by reference on interface parameter in GolangBack to the college days, I remember there are 2 ways to pass a parameter to a function. One passes by value, and the other one passes by reference. Both of these ways have a different concept and sometimes it brings confusion to the programmer.In simple terms, pass by value is when we pass the parameter without a pointer to that origin address of the value. And pass by reference is when we pass the parameter with a pointer to the given parameter.In Golang, we can see these two in this example below.func passByValue(item string)func passByReference(item *string)Pass By Reference and Pass By Value in (...)