Skip to content

Commit 1153caa

Browse files
committed
update docs with CMD_PATH
1 parent 8c276bc commit 1153caa

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

www/pages/index.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ gopkg.in/yaml.v2
4646
... | OUT=example.exe sh
4747
```
4848

49+
`CMD_PATH` - Path to the binary package (default: "")
50+
51+
```sh
52+
# Export Windows executable
53+
... | CMD_PATH="/cmd/example" sh
54+
```
55+
4956
## Examples
5057

5158
Install the latest version:
@@ -72,11 +79,28 @@ Use alternative sources:
7279
curl -sf {{.Data.env.GOBLIN_ORIGIN_URL}}/golang.org/x/tools/godoc | sh
7380
```
7481

82+
Specify nested packages
83+
84+
> Note: nested package expect the path to be a `package main` file with a `main`
85+
> call. If you use something like `spf13/cobra` then check the 2nd example.
86+
87+
```command
88+
curl -sf {{.Data.env.GOBLIN_ORIGIN_URL}}/vito/bass/cmd/bass | sh
89+
```
90+
91+
```command
92+
curl -sf {{.Data.env.GOBLIN_ORIGIN_URL}}/gnorm.org/gnorm | CMD_PATH="/cli" PREFIX=./bin sh
93+
```
94+
7595
## How does it work?
7696

77-
Each request resolves the needed tags and versions from [proxy.golang.org](https://proxy.golang.org). If no module is found, you can try replacing the version with a commit hash on supported platforms, e.g. GitHub.
97+
Each request resolves the needed tags and versions from
98+
[proxy.golang.org](https://proxy.golang.org). If no module is found, you can try
99+
replacing the version with a commit hash on supported platforms, e.g. GitHub.
78100

79-
The response of this request is a Golang binary compiled for the requested operating system, architecture, package version, and the binary's name—using Go 1.17.x via the official [Docker image](https://hub.docker.com/_/golang).
101+
The response of this request is a Golang binary compiled for the requested
102+
operating system, architecture, package version, and the binary's name—using Go
103+
1.17.x via the official [Docker image](https://hub.docker.com/_/golang).
80104

81105
**Example response**
82106

0 commit comments

Comments
 (0)