I'm new to go, pardon me if this is a regular question, How does the assignment to a string dereference operator works below?
package main
import "fmt"
func main() {
course := "Docker Deep Dive"
changeCourse(&course)
}
func changeCourse(course *string) {
fmt.Println(course) // prints the memory address of course since it is a pointer
fmt.Println(*course) // prints the value since * is dereferenceing the pointer
// Issue
*course = "Docker Extended" // *course is a string, how does the assignment works here.
fmt.Println(*course) // prints "Docker Extended"
}