-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More details how to install and setup go for development.
- Loading branch information
1 parent
137a075
commit 27879c3
Showing
1 changed file
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,4 +53,24 @@ To aggregate all loaded VCLs into per-backend metric the following Prometheus [r | |
|
||
# Build | ||
|
||
Use `go build` or `./build.sh <version>` for cross compilation. | ||
**One time setup** | ||
1. [Install go](https://golang.org/doc/install) or use OS repos `golang` package. | ||
2. Make a directory e.g. `~/go-workspace` for go development and set it to env variable `GOPATH`. | ||
|
||
**Development** | ||
```bash | ||
# clone | ||
mkdir mkdir -p $GOPATH/src/github.com/jonnenauha | ||
cd $GOPATH/src/github.com/jonnenauha | ||
git clone [email protected]:jonnenauha/prometheus_varnish_exporter.git | ||
cd prometheus_varnish_exporter | ||
|
||
# build | ||
go get -v # get deps | ||
go build # build binary to current directory | ||
|
||
# release with cross compilation | ||
./build.sh <version> | ||
``` | ||
|
||
You can fork this repo and replace the working dir with `$GOPATH/src/github.com/<username>` and sent PRs from your development fork. Other git providers than github will also work just fine, just adapt your package dir path. |