Skip to content

Commit

Permalink
Use dep for dependencies
Browse files Browse the repository at this point in the history
Make setup and predictable builds easier for contributors by locking to
a set of dependencies. Some of the dependencies have been locked to
specific commits on master in order to accomodate projects that do not
ship releases often such as cobra and gomock (see
spf13/cobra#259 for details).

- Change mockgen commands to use a -source flag to explicitly point to
  the files in vendor for generating mocks. This, for some reason, fixes
  a bug in gomock whereby it uses the vendor path as the import path
  which breaks some dependencies.

  See golang/mock#28 for more details.
  • Loading branch information
jpignata committed Feb 5, 2018
1 parent 8f8ae83 commit a3f46fa
Show file tree
Hide file tree
Showing 7 changed files with 1,180 additions and 1,023 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@
bin
fargate
dist
vendor
102 changes: 102 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions Gopkg.toml
@@ -0,0 +1,54 @@

# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"


[[constraint]]
name = "github.com/aws/aws-sdk-go"
version = "1.12.70"

[[constraint]]
name = "github.com/golang/mock"
revision = "b3e60bcdc577185fce3cf625fc96b62857ce5574"

[[constraint]]
branch = "master"
name = "github.com/hashicorp/golang-lru"

[[constraint]]
name = "github.com/kyokomi/emoji"
version = "1.5.0"

[[constraint]]
branch = "master"
name = "github.com/mgutz/ansi"

[[constraint]]
name = "github.com/spf13/cobra"
revision = "ccaecb155a2177302cb56cae929251a256d0f646"

[[constraint]]
branch = "master"
name = "golang.org/x/crypto"

[[constraint]]
branch = "master"
name = "golang.org/x/time"
2 changes: 1 addition & 1 deletion acm/main.go
@@ -1,7 +1,7 @@
package acm

//go:generate mockgen -package client -destination=mock/client/client.go github.com/jpignata/fargate/acm Client
//go:generate mockgen -package sdk -destination=mock/sdk/acmiface.go github.com/aws/aws-sdk-go/service/acm/acmiface ACMAPI
//go:generate mockgen -package sdk -source ../vendor/github.com/aws/aws-sdk-go/service/acm/acmiface/interface.go -destination=mock/sdk/acmiface.go github.com/aws/aws-sdk-go/service/acm/acmiface ACMAPI

import (
"github.com/aws/aws-sdk-go/aws/session"
Expand Down

0 comments on commit a3f46fa

Please sign in to comment.