mardi 4 octobre 2016

GO: Get all fields from an interface

How do I know the fields I can access from the reply object/interface? I tried reflection but it seems you have to know have the field name first. What if I need to know all the fields available to me?

// Do sends a command to the server and returns the received reply.
Do(commandName string, args ...interface{}) (reply interface{}, err error)





Aucun commentaire:

Enregistrer un commentaire