I've got a common project and small projects which act such as connectors in the common project.
I want to create a common project such that when a new connector is developed I don’t have to modify code in the common project. Is it possible to dynamically load the structures in Go, only knowing the path (by putting this path in a file in common project and at runtime load that struct) of the struct and its folders?
connector1 connector1.go /util /domain connectorN connectorN.go /domain commonProject main.go config.ini
Structure config.ini
Conector name = connector1 path = ..../connector1/connector1.go Conector name = connectorN path = ..../connectorN/connectorN.go
I know that this is possible to do this in Java with code like this, but I am trying to do this in Go. Any ideas?
Class.forName(String)
or
ClassLoader.loadClass(String):