From 88644088e2536cc0621e2eaa9371255d33a6a741 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 13 Nov 2020 14:18:53 -0700 Subject: [PATCH] always document go generate before go build --- README.md | 3 ++- cmd/mgmt/README.md | 3 ++- cmd/telebit/README.md | 3 ++- examples/WHITELIST.md | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f54b68f..00e6270 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ pushd telebit/ You can build with `go build`: ```bash +go generate -mod=vendor ./... go build -mod vendor -race -o telebit cmd/telebit/*.go ``` @@ -123,7 +124,7 @@ curl.exe -fsSA "MS" https://webinstall.dev/golang | powershell All dependencies are included, at the correct version in the `./vendor` directory. ```bash -go generate ./... +go generate -mod vendor ./... CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod vendor -o telebit-linux ./cmd/telebit/*.go CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -mod vendor -o telebit-macos ./cmd/telebit/*.go diff --git a/cmd/mgmt/README.md b/cmd/mgmt/README.md index c5c0420..03da55a 100644 --- a/cmd/mgmt/README.md +++ b/cmd/mgmt/README.md @@ -187,6 +187,7 @@ curl -L -X DELETE http://mgmt.example.com:6468/api/devices/${my_subdomain} -H "A You can build with `go build`: ```bash +go generate -mod vendor ./... go build -mod vendor -race -o telebit-mgmt cmd/mgmt/*.go ``` @@ -199,7 +200,7 @@ goreleaser --rm-dist --skip-publish --snapshot Or cross-compile: ```bash -go generate ./... +go generate -mod vendor ./... CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod vendor -o telebit-mgmt-linux ./cmd/mgmt/*.go CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -mod vendor -o telebit-mgmt-macos ./cmd/mgmt/*.go diff --git a/cmd/telebit/README.md b/cmd/telebit/README.md index 7d1734c..4cdce29 100644 --- a/cmd/telebit/README.md +++ b/cmd/telebit/README.md @@ -100,6 +100,7 @@ bash examples/admin-disconnect-device.sh You can build with `go build`: ```bash +go generate -mod vendor ./... go build -mod vendor -race -o telebit-relay cmd/telebit/*.go ``` @@ -112,7 +113,7 @@ goreleaser --rm-dist --skip-publish --snapshot Or cross-compile: ```bash -go generate ./... +go generate -mod vendor ./... CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod vendor -o telebit-relay-linux ./cmd/telebit/*.go CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -mod vendor -o telebit-relay-macos ./cmd/telebit/*.go diff --git a/examples/WHITELIST.md b/examples/WHITELIST.md index 18f6abc..14b861d 100644 --- a/examples/WHITELIST.md +++ b/examples/WHITELIST.md @@ -23,7 +23,7 @@ All of the devices need to be under the same domain. You are limited by Let's En ## White Label Builds ```bash -go generate ./... +go generate -mod vendor ./... VENDOR_ID="example.com"