I'm developing a library where i have 1 common interface and a lot of 
implementations (likely hundreds).
A single implementation is not too complex and can reside in a single 
source file but then i have visibility issues with constants etc. Should i 
just create a package for each implementation?

The execution flow of this program will be something like:
*input data -> find implementation -> execute implementation -> return 
common struct*
The program shouldn't use these implementations directly. 
I'm thinking to use an entry point package that holds a map of the 
implementations exporting *Find/Register* methods. This entry point package 
will also import with an underscore all impl packages so that they can self 
register with an *init* method without exporting anything.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to