Working with Go I was getting various errors trying to return a string as pointer while returning another value as well. Something like this (pls. excuse for this not being running code, I just wrote it to give a sense of what I want to do since I don't know how to exactly make it work):
func A (s string) *string, int {
// Stuff
return &a, b
}
*c, d := A("Hi there.")
When I try various combinations to say, return the string (var. a
) as a pointer I get various errors. It's easy and there's dozens of examples with a single variable returned but I'm not sure if it's possible with multiple return values.
Sorry if this seems like a very basic question, I'm still wrapping my mind around Go.