I'm pretty new to Go, and I'd like to make this snippet into a function.
Basically, I would like to know if there is a possible way to pass a variable name into a function call so if I called:
changeColor(varName)
It would run, and then assign a new value to the original variable, which was inputted into the function call.
Hopefully this makes sense, and thanks in advance
if varName == yellow {
varName = black
} else {
varName = yellow
}