Skip to content
Permalink
Browse files

Experiment with Go Modules (#1285)

* GO111MODULE=on go mod init

* GO111MODULE=on go build ./...

* GO111MODULE=on go get github.com/google/tink/go/keyset@HEAD

* GO111MODULE=on go get github.com/google/trillian/util/election2@HEAD

* GO111MODULE=on go get github.com/golang/mock/gomock

* GO111MODULE=on go get github.com/google/trillian@HEAD

* GO111MODULE=on go test ./...

* Disable go get when modules are on

* Add pkg/mod to travis cache
  • Loading branch information...
gdbelvin committed May 31, 2019
1 parent d8c35f9 commit 1d8b1b43306975ca90486462c741bdc3c708ebca
Showing with 238 additions and 2 deletions.
  1. +3 −0 .golangci.yml
  2. +6 −2 .travis.yml
  3. +33 −0 go.mod
  4. +196 −0 go.sum
@@ -1,3 +1,6 @@
run:
timeout: 5m

linters-settings:
govet:
check-shadowing: false
@@ -8,10 +8,14 @@ go_import_path: github.com/google/keytransparency
cache:
directories:
- "$HOME/gcloud/"
- "$HOME/gopath/pkg/mod"
env:
global:
- PATH=$PATH:${HOME}/google-cloud-sdk/bin
- CLOUDSDK_CORE_DISABLE_PROMPTS=1
matrix:
- GO111MODULE=on
- GO111MODULE=auto

before_install:
- |
@@ -30,11 +34,11 @@ before_install:
install:
- gcloud -q components install kubectl
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.16.0
- go get -t ./...
- if [ "$GO111MODULE" = "auto" ]; then go get -t -v ./... ; fi

script:
- go build ./...
- golangci-lint run
- golangci-lint run --deadline=5m
- go test ./... -coverprofile=coverage1.txt
- go test ./impl/integration/ -coverprofile=coverage2.txt -coverpkg=./...

33 go.mod
@@ -0,0 +1,33 @@
module github.com/google/keytransparency

go 1.12

require (
github.com/benlaurie/objecthash v0.0.0-20180202135721-d1e3d6079fc1
github.com/go-sql-driver/mysql v1.4.1 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
github.com/golang/mock v1.3.1
github.com/golang/protobuf v1.3.1
github.com/google/btree v1.0.0 // indirect
github.com/google/certificate-transparency-go v1.0.21 // indirect
github.com/google/go-cmp v0.2.0
github.com/google/tink v1.2.1-0.20190523150020-6495d823d968
github.com/google/trillian v1.2.2-0.20190524132942-bbaabdb62893
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/grpc-ecosystem/grpc-gateway v1.9.0
github.com/kr/pretty v0.1.0
github.com/kylelemons/godebug v1.1.0
github.com/lib/pq v1.1.1 // indirect
github.com/mattn/go-sqlite3 v1.10.0
github.com/prometheus/client_golang v0.9.3
github.com/spf13/cobra v0.0.4
github.com/spf13/pflag v1.0.3
github.com/spf13/viper v1.3.2
golang.org/x/crypto v0.0.0-20190513172903-22d7a77e9e5f
golang.org/x/oauth2 v0.0.0-20190517181255-950ef44c6e07
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4
google.golang.org/api v0.5.0
google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69
google.golang.org/grpc v1.21.0
)

0 comments on commit 1d8b1b4

Please sign in to comment.
You can’t perform that action at this time.