From 66978d637ac98d0c2438ecb9088bef90668602de Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Thu, 21 May 2020 10:38:07 -0400 Subject: [PATCH] Fix tools bootstrap --- go.mod | 1 + go.sum | 2 ++ tools/tools.go | 23 +++++++++++++++-------- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 69dfd8dfb..05ffaa5a7 100644 --- a/go.mod +++ b/go.mod @@ -37,6 +37,7 @@ require ( github.com/mattn/go-colorable v0.1.6 github.com/mitchellh/cli v1.1.1 github.com/mitchellh/go-homedir v1.1.0 + github.com/mitchellh/gox v1.0.1 github.com/mitchellh/mapstructure v1.3.0 github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect github.com/oligot/go-mod-upgrade v0.1.2 diff --git a/go.sum b/go.sum index 1f4997f76..9463fc37d 100644 --- a/go.sum +++ b/go.sum @@ -932,9 +932,11 @@ github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdI github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= +github.com/mitchellh/gox v1.0.1 h1:x0jD3dcHk9a9xPSDN6YEL4xL6Qz0dvNYm8yZqui5chI= github.com/mitchellh/gox v1.0.1/go.mod h1:ED6BioOGXMswlXa2zxfh/xdd5QhwYliBFn9V18Ap4z4= github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= +github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= diff --git a/tools/tools.go b/tools/tools.go index b0e94753f..73c5bbc4b 100644 --- a/tools/tools.go +++ b/tools/tools.go @@ -10,31 +10,38 @@ package tools +// NOTE: This must not be indented, so to stop goimports from trying to be +// helpful, it's separated out from the import block below. Please try to keep +// them in the same order. +//go:generate go install github.com/bufbuild/buf/cmd/buf +//go:generate go install github.com/favadi/protoc-go-inject-tag +//go:generate go install github.com/go-swagger/go-swagger/cmd/swagger +//go:generate go install github.com/golang/protobuf/protoc-gen-go +//go:generate go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway +//go:generate go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger +//go:generate go install golang.org/x/tools/cmd/goimports +//go:generate go install github.com/oligot/go-mod-upgrade +//go:generate go install github.com/mitchellh/gox + import ( - //go:generate go install github.com/bufbuild/buf/cmd/buf _ "github.com/bufbuild/buf/cmd/buf" - //go:generate go install github.com/favadi/protoc-go-inject-tag _ "github.com/favadi/protoc-go-inject-tag" - //go:generate go install github.com/go-swagger/go-swagger/cmd/swagger _ "github.com/go-swagger/go-swagger/cmd/swagger" // use this instead of google.golang.org/protobuf/cmd/protoc-gen-go since this supports grpc plugin while the other does not. // see https://github.com/golang/protobuf/releases#v1.4-generated-code and // https://github.com/protocolbuffers/protobuf-go/releases/tag/v1.20.0#v1.20-grpc-support - //go:generate go install github.com/golang/protobuf/protoc-gen-go _ "github.com/golang/protobuf/protoc-gen-go" - //go:generate go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway" - //go:generate go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger _ "github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger" - //go:generate go install golang.org/x/tools/cmd/goimports _ "golang.org/x/tools/cmd/goimports" - //go:generate go install github.com/oligot/go-mod-upgrade _ "github.com/oligot/go-mod-upgrade" + + _ "github.com/mitchellh/gox" )