Skip to content

How to return a pointer to a Client, or the equivalence of this (Doing it for me returns the interface) #175

Closed Answered by rueian
oAnubis asked this question in Q&A
Discussion options

You must be logged in to vote

I would recommend just storing and passing the Client interface around. Just like the go-redis’ UniversalClient.

In general, there would be no need to hold a pointer value of the concrete implementation struct.

May I have some of extra code you mentioned to understand your problem in more detail?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by oAnubis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants