This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* migrate to go module * install mockery * do not always download pflags * latest version of flytestdlib * refomat * Revert "refomat" This reverts commit 106ee8e. * mockery * mockery * sum * test * test * test * test * test * Update .travis.yml * Update Makefile * Update Makefile * move it to the right place * install mockery in a temp folder * add comments * upgrade flytestdlib * go mod tidy * add h1 sum * test * rebase from master * latest flytestdlib * install pflags in tmp folder * change go version back * add comment * incorporate latest boilerplate changes * rely on Makefile to install mockery * updated boilerplate * use install instead * actually adding the new boilerplate entry and updating again * removing unnecessary files * no need for replacement in root go.mod Co-authored-by: Yee Hing Tong <[email protected]>
- Loading branch information
Showing
14 changed files
with
1,092 additions
and
761 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module github.com/lyft/boilerplate | ||
|
||
go 1.13 | ||
|
||
require ( | ||
github.com/golangci/golangci-lint v1.22.2 | ||
github.com/lyft/flytestdlib v0.2.31 | ||
github.com/vektra/mockery v0.0.0-20181123154057-e78b021dcbb5 | ||
github.com/alvaroloes/enumer v1.1.2 | ||
) | ||
|
||
replace github.com/vektra/mockery => github.com/enghabu/mockery v0.0.0-20191009061720-9d0c8670c2f0 |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// +build tools | ||
|
||
package tools | ||
|
||
import ( | ||
_ "github.com/golangci/golangci-lint/cmd/golangci-lint" | ||
_ "github.com/lyft/flytestdlib/cli/pflags" | ||
_ "github.com/vektra/mockery/cmd/mockery" | ||
_ "github.com/alvaroloes/enumer" | ||
) |
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
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
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
# Everything in this file needs to be installed outside of current module | ||
# The reason we cannot turn off module entirely and install is that we need the replace statement in go.mod | ||
# because we are installing a mockery fork. Turning it off would result installing the original not the fork. | ||
# We also want to version all the other tools. We also want to be able to run go mod tidy without removing the version | ||
# pins. To facilitate this, we're maintaining two sets of go.mod/sum files - the second one only for tooling. This is | ||
# the same approach that go 1.14 will take as well. | ||
# See: | ||
# https://github.com/lyft/flyte/issues/129 | ||
# https://github.com/golang/go/issues/30515 for some background context | ||
# https://github.com/go-modules-by-example/index/blob/5ec250b4b78114a55001bd7c9cb88f6e07270ea5/010_tools/README.md | ||
|
||
set -e | ||
|
||
# List of tools to go get | ||
# In the format of "<cli>:<package>" or ":<package>" if no cli | ||
tools=( | ||
"github.com/vektra/mockery/cmd/mockery" | ||
"github.com/lyft/flytestdlib/cli/pflags" | ||
"github.com/golangci/golangci-lint/cmd/golangci-lint" | ||
"github.com/alvaroloes/enumer" | ||
) | ||
|
||
tmp_dir=$(mktemp -d -t gotooling-XXX) | ||
echo "Using temp directory ${tmp_dir}" | ||
cp -R boilerplate/lyft/golang_support_tools/* $tmp_dir | ||
pushd "$tmp_dir" | ||
|
||
for tool in "${tools[@]}" | ||
do | ||
echo "Installing ${tool}" | ||
GO111MODULE=on go install $tool | ||
done | ||
|
||
popd |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
lyft/golang_test_targets | ||
lyft/golangci_file | ||
lyft/golang_support_tools |
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
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#!/bin/bash | ||
set -e | ||
set -x | ||
which mockery || (go install github.com/lyft/flyteidl/vendor/github.com/vektra/mockery/cmd/mockery) | ||
|
||
mockery -dir=gen/pb-go/flyteidl/service/ -name=AdminServiceClient -output=clients/go/admin/mocks | ||
mockery -dir=gen/pb-go/flyteidl/datacatalog/ -name=ArtifactsClient -output=clients/go/datacatalog/mocks |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
module github.com/lyft/flyteidl | ||
|
||
go 1.13 | ||
|
||
require ( | ||
github.com/antihax/optional v1.0.0 | ||
github.com/coreos/go-oidc v2.1.0+incompatible | ||
github.com/gogo/protobuf v1.3.1 // indirect | ||
github.com/golang/protobuf v1.3.2 | ||
github.com/grpc-ecosystem/go-grpc-middleware v1.1.0 | ||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 | ||
github.com/grpc-ecosystem/grpc-gateway v1.11.3 | ||
github.com/influxdata/influxdb v1.7.9 | ||
github.com/lyft/flytestdlib v0.2.31 | ||
github.com/mitchellh/mapstructure v1.1.2 | ||
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 // indirect | ||
github.com/spf13/pflag v1.0.5 | ||
github.com/stretchr/testify v1.4.0 | ||
golang.org/x/net v0.0.0-20191028085509-fe3aa8a45271 // indirect | ||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 | ||
golang.org/x/sys v0.0.0-20191028164358-195ce5e7f934 // indirect | ||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0 | ||
google.golang.org/genproto v0.0.0-20191028173616-919d9bdd9fe6 | ||
google.golang.org/grpc v1.24.0 | ||
gopkg.in/inf.v0 v0.9.1 // indirect | ||
gopkg.in/square/go-jose.v2 v2.4.1 // indirect | ||
k8s.io/api v0.0.0-20191025225708-5524a3672fbb | ||
k8s.io/client-go v0.0.0-20191016111102-bec269661e48 // indirect | ||
) |
Oops, something went wrong.