call a function from external library
// which is only used here and nowhere else in the program
}
will this library be bundled into my compiled binary ?
what library? It most likely will
i want to make multiple versions of my my app, one with a feature and one without. And the condition is behind a configuration constant.
so, you want to do something like this in go? #ifdef USE_SOME_LIB // use lib here #endif that's why you are using a boolean constant, so if a user wants to use it, set it to true and compiler compile it only in that situation?
hmmmm, have you already check these references? https://pkg.go.dev/go/build https://stackoverflow.com/questions/38950909/c-style-conditional-compilation-in-golang ^ it has some references in it that may help you I've seen some similar cases before, but never have experienced the same thing, so can't help that much
Обсуждают сегодня