One way to solve this is to send a pull request to the author of the tool 
that extracts functionality that you want to reuse into a package. This 
will benefit any future users that are in the same situation.

There might be reasons that the author of the tool will be against such 
change though. If this is the case I think the only other option is to 
maintain such package yourself (as you suggested in your email). If the 
upstream changes often you might want to automate the process of checking 
out the repository and making necessary changes.

On Wednesday, 6 July 2016 08:01:16 UTC+8, Mike wrote:
>
> Hi,
>
> I am interested in driving a command line written in go from my own go 
> code but I do not want just to wrap the command line and would like to 
> build it into my own binary. Most of the tool entry points are in its main 
> package but I can't obviously import the main package. I can copy just its 
> main package code into mine, give it a new package name and compile but I 
> can't stay in sych with the tool code base (in github) in a clean way. 
>
> what is your recommended way of doing this?
>
> Thanks,
> Mike
>

-- 
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