digitalmars.D.learn - Is there an alternative of `go get`
- Ky-Anh Huynh (11/11) Aug 07 2020 Hi everyone,
- Cogitri (8/19) Aug 07 2020 Hello,
- Steven Schveighoffer (4/26) Aug 07 2020 Having a way to configure the path would be really helpful. I'll add a
Hi everyone, `go get` in Golang world has a simple way to fetch and install binary ``` $ go get github/foo/bar.git $ export PATH=$PATH:$(go env GOPATH)/bin $ bar --help ``` This saves a lot of time and setup. Is that an alternative when using dub? Thanks a lot.
Aug 07 2020
On Friday, 7 August 2020 at 07:17:25 UTC, Ky-Anh Huynh wrote:Hi everyone, `go get` in Golang world has a simple way to fetch and install binary ``` $ go get github/foo/bar.git $ export PATH=$PATH:$(go env GOPATH)/bin $ bar --help ``` This saves a lot of time and setup. Is that an alternative when using dub? Thanks a lot.Hello, you can use `dub build $name` to build the package. The resulting binary should be in $HOME/.dub/$name-$version/$name/bin then. You can also run the binary via `dub run $name -- $additional_args`, then you won't have to add that path to your PATH. If you haven't run `dub build $name` previously, `dub run $name` will do that for you.
Aug 07 2020
On 8/7/20 3:28 AM, Cogitri wrote:On Friday, 7 August 2020 at 07:17:25 UTC, Ky-Anh Huynh wrote:Having a way to configure the path would be really helpful. I'll add a request for dub. -SteveHi everyone, `go get` in Golang world has a simple way to fetch and install binary ``` $ go get github/foo/bar.git $ export PATH=$PATH:$(go env GOPATH)/bin $ bar --help ``` This saves a lot of time and setup. Is that an alternative when using dub?Hello, you can use `dub build $name` to build the package. The resulting binary should be in $HOME/.dub/$name-$version/$name/bin then. You can also run the binary via `dub run $name -- $additional_args`, then you won't have to add that path to your PATH. If you haven't run `dub build $name` previously, `dub run $name` will do that for you.
Aug 07 2020