To turn a *T into T , use the * operator:
func Dereference(strptr *string) string { return *strptr }
I highly recommend that you read about pointers before moving on to the language. They are a fundamental concept, without which it is impossible to effectively use the language.
source share