I am developing a small tool with Go. And recently, I noticed that the tool needs to be called from a shell script because it uses a shell function.
Suppose my tool is called atool . So go build generates a binary atool , and my tool has a Go structure like github.com/myaccount/atool . Now I want to build atool-cli binary with go build and call it from the atool script atool . How can i achieve this?
The only way that comes to my mind is to change the go structure like github.com/myaccuont/atool-cli . But I do not want to do this, because the already announced one, as well as the way, seems a little ridiculous.
source share