Hi! I am trying to make a CLI tool which would have sub-commands and some of them would call into other existing CLI tools (written in Go). The issue is that those other commands sometimes have CLI parsing code as part of the main package (e.g., example.com/cmd/example) and the hook to call into the main (passing a list of arguments) is also in the main package. I do not want to use a subprocess because that would mean that a user would have to install those other CLI tools, too.
I understand why it is not reasonable to import main packages into non-main packages, but my understanding is that importing a main package into another main package should work, at least according to [1]. But I cannot get it to work. So is [1] wrong or has that changed since then? Is there some other way to get `go install`ed tool to define a dependency on another `go install`ed tool so that both are installed as CLI tools? Mitar [1] https://groups.google.com/g/golang-nuts/c/frh9zQPEjUk/m/9tnVPAegDgAJ -- http://mitar.tnode.com/ https://twitter.com/mitar_m -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAKLmikOosfu7Cj1NtFBeunMiBfcXhUkYiTx_Z2A05qg%3DyAemfg%40mail.gmail.com.
