I
I
IllusionTurtle2016-03-16 14:40:53
go
IllusionTurtle, 2016-03-16 14:40:53

How, in go, to determine the type of an interface which type is struct?

Need help with reflect.
It's easier to show the code than to explain: https://play.golang.org/p/bH45-LCyp7
here I need to see not an empty string, but the TEST type.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mr4x, 2016-03-16
@IllusionTurtle

Unfortunately, this is not possible, v is a synonym for TEST, but two types of structures are created during compilation: v and TEST.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question