mercredi 12 septembre 2018

How to do metaprogramming or conditional compilation in function level instead of platform in GoLang?

I am trying to build a binary that will contain different modules, but at the same time, I want the user to be able to choose what modules will be included in the generated binary.

I have also asked in SE stackoverflow: https://softwareengineering.stackexchange.com/questions/378319/building-object-with-arbitrary-functionalities

I think this is out of my knowledge and I might need some help with this.

I am thinking about writing another Go Program that strip out functions from the go files before compilation. I have never done/heard about this before and it seems to be a bit hacky. Just wondering what will be the best approach to this problem.

Thanks!

Aucun commentaire:

Enregistrer un commentaire