reflection
lundi 14 décembre 2020
In Go, is there anything like Java's Class.newInstance?
I know there is no default constructor in Go.
I want to new some "decoder" at runtime, according to received message's type.
So, what can I do? Use a map, key is the name of type, value is some wrapper function to init/new?
Aucun commentaire:
Enregistrer un commentaire
Article plus récent
Article plus ancien
Accueil
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire