From 7c49255c2a67feb583d737d4fa103e729e2857b1 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Mon, 17 Oct 2016 13:09:56 +0200 Subject: [PATCH] Add hints how to use the `go` tool and direnv --- .envrc | 1 + CONTRIBUTING.md | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 .envrc diff --git a/.envrc b/.envrc new file mode 100644 index 000000000..c153542be --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +GOPATH=$PWD:$PWD/vendor diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5bb5b520e..97b5c0e68 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -92,6 +92,16 @@ quickly set up VMs and run the tests, e.g.: $ vagrant ssh freebsd -c 'cd restic/restic; go test -v ./...' [...] +The default `go` tool can also be used by setting the environment variable +`GOPATH` to the following value while being in the top level directory in the +git repository: + + $ export GOPATH=$PWD:$PWD/vendor + +The file `.envrc` allows automatic `GOPATH` configuration with +[direnv](https://direnv.net/), inspect the file and then allow automatic +configuration by running `direnv allow`. + Providing Patches =================