I want to keep some code private due to licensing, but everything I create on top of it, I want to make that open sauce
for everyone. I have done so with the following files setup.
This is the app I am making for my company with the licensed software or whatever.
$GOPATH/github.com/protosam/myapp/main.go
My company licenses code from these private-api guys or something. Whatever, their crud can live in this lonely repo. I need to build with this FUD-ware at some point, because I wamt to be paid.
$GOPATH/github.com/protosam/private-api-extras/extras.go
The public-api repo is stuff I made for the app that I'm allowed to sauce
out with whatever license. The extras.go
file has a build flag of +build private
. This will make it not be included during a normal build. In there I will place wrapper functions for capitolism-api cough Ahem. I mean private-api.
$GOPATH/github.com/protosam/public-api/myapi.go