Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

Commit

Permalink
gmockgen: make go-gettable, convert to go modules
Browse files Browse the repository at this point in the history
  • Loading branch information
tmc committed Dec 1, 2018
1 parent e1060dc commit ee6a45f
Show file tree
Hide file tree
Showing 29 changed files with 1,680 additions and 1,023 deletions.
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ test: go-get $(TEST_SRC) $(CMD_TEST_SRC)
GOPATH=$(RUNTIME_GOPATH) go test -v $(CMD_TEST_SRC)

go-get:
go get github.com/mitchellh/cli
go get github.com/aws/aws-sdk-go
go get github.com/ryanuber/go-glob
go get github.com/golang/mock/gomock
go get github.com/mattn/go-shellwords
go get

clean:
rm -f gcredstash{,.exe} *.gz *.zip
Expand Down
7 changes: 4 additions & 3 deletions cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package main

import (
"fmt"
"gcredstash"
"gcredstash/command"
"os"

"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/kms"
"github.com/mitchellh/cli"
"os"
"github.com/winebarrel/gcredstash/src/gcredstash"
"github.com/winebarrel/gcredstash/src/gcredstash/command"
)

func Run(args []string) int {
Expand Down
2 changes: 1 addition & 1 deletion commands.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"gcredstash/command"
"github.com/mitchellh/cli"
"github.com/winebarrel/gcredstash/src/gcredstash/command"
)

func Commands(meta *command.Meta) map[string]cli.CommandFactory {
Expand Down
10 changes: 10 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module github.com/winebarrel/gcredstash

require (
github.com/aws/aws-sdk-go v1.15.88
github.com/golang/mock v1.1.1
github.com/mattn/go-shellwords v1.0.3
github.com/mitchellh/cli v1.0.0
github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc // indirect
)
31 changes: 31 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/aws/aws-sdk-go v1.15.88 h1:Om0MayFrixOds/PrbBey2Cg/lkNEIyOrAF2RFXLwmnE=
github.com/aws/aws-sdk-go v1.15.88/go.mod h1:es1KtYUFs7le0xQ3rOihkuoVD90z7D0fR2Qm4S00/gU=
github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/golang/mock v1.1.1 h1:G5FRp8JnTd7RQH5kemVNlMeyXQAztQ3mOWV95KxsXH8=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 h1:12VvqtR6Aowv3l/EQUlocDHW2Cp4G9WJVH7uyH8QFJE=
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-isatty v0.0.3 h1:ns/ykhmWi7G9O+8a448SecJU3nSMBXJfqQkl0upE1jI=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-shellwords v1.0.3 h1:K/VxK7SZ+cvuPgFSLKi5QPI9Vr/ipOf4C1gN+ntueUk=
github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o=
github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735 h1:7YvPJVmEeFHR1Tj9sZEYsmarJEQfMVYpd/Vyy/A8dqE=
github.com/ryanuber/go-glob v0.0.0-20170128012129-256dc444b735/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc=
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc h1:a3CU5tJYVj92DY2LaA1kUkrsqD5/3mLDhx2NcNqyW+0=
golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
2 changes: 1 addition & 1 deletion src/gcredstash/base64_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gcredstash

import (
. "gcredstash"
. "github.com/winebarrel/gcredstash/src/gcredstash"
"testing"
)

Expand Down
3 changes: 2 additions & 1 deletion src/gcredstash/command/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package command

import (
"fmt"
"gcredstash"
"os"
"strings"

"github.com/winebarrel/gcredstash/src/gcredstash"
)

type DeleteCommand struct {
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/command/detele_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package command

import (
"gcredstash"
"github.com/winebarrel/gcredstash/src/gcredstash"
. "gcredstash/command"
"gcredstash/testutils"
"github.com/aws/aws-sdk-go/aws"
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/command/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package command

import (
"fmt"
"gcredstash"
"github.com/winebarrel/gcredstash/src/gcredstash"
"github.com/ryanuber/go-glob"
"os"
"strings"
Expand Down
6 changes: 3 additions & 3 deletions src/gcredstash/command/get_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package command

import (
"gcredstash"
"github.com/winebarrel/gcredstash/src/gcredstash"
. "gcredstash/command"
"gcredstash/testutils"
"github.com/aws/aws-sdk-go/aws"
Expand Down Expand Up @@ -392,7 +392,7 @@ func TestGetCommandWithE(t *testing.T) {
},
}

tmpfile, _ := ioutil.TempFile("", "gcredstash")
tmpfile, _ := ioutil.TempFile("", "github.com/winebarrel/gcredstash/src/gcredstash")
defer os.Remove(tmpfile.Name())

args := []string{"-e", tmpfile.Name(), name}
Expand Down Expand Up @@ -448,7 +448,7 @@ func TestGetCommandWithErrOutEnv(t *testing.T) {
},
}

tmpfile, _ := ioutil.TempFile("", "gcredstash")
tmpfile, _ := ioutil.TempFile("", "github.com/winebarrel/gcredstash/src/gcredstash")
defer os.Remove(tmpfile.Name())

args := []string{name}
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/command/getall.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package command

import (
"fmt"
"gcredstash"
"github.com/winebarrel/gcredstash/src/gcredstash"
"os"
"strings"
)
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/command/getall_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package command

import (
"gcredstash"
"github.com/winebarrel/gcredstash/src/gcredstash"
. "gcredstash/command"
"gcredstash/testutils"
"github.com/aws/aws-sdk-go/aws"
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/command/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package command

import (
"fmt"
"gcredstash"
"github.com/winebarrel/gcredstash/src/gcredstash"
"os"
"sort"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/command/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package command

import (
"fmt"
"gcredstash"
"github.com/winebarrel/gcredstash/src/gcredstash"
. "gcredstash/command"
"gcredstash/testutils"
"github.com/aws/aws-sdk-go/aws"
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/command/meta.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package command

import (
"gcredstash"
"github.com/winebarrel/gcredstash/src/gcredstash"
"github.com/mitchellh/cli"
)

Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/command/put.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package command

import (
"fmt"
"gcredstash"
"github.com/winebarrel/gcredstash/src/gcredstash"
"os"
"strings"
)
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/command/put_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package command

import (
"gcredstash"
"github.com/winebarrel/gcredstash/src/gcredstash"
. "gcredstash/command"
"gcredstash/testutils"
"github.com/aws/aws-sdk-go/aws"
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/command/setup_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package command

import (
"gcredstash"
"github.com/winebarrel/gcredstash/src/gcredstash"
. "gcredstash/command"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/dynamodb"
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/command/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package command
import (
"bytes"
"fmt"
"gcredstash"
"github.com/winebarrel/gcredstash/src/gcredstash"
"github.com/mattn/go-shellwords"
"text/template"
"io/ioutil"
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/command/template_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package command

import (
"gcredstash"
"github.com/winebarrel/gcredstash/src/gcredstash"
. "gcredstash/command"
"gcredstash/testutils"
"github.com/aws/aws-sdk-go/aws"
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/crypt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package gcredstash

import (
"bytes"
. "gcredstash"
. "github.com/winebarrel/gcredstash/src/gcredstash"
"testing"
)

Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/driver_setup_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gcredstash

import (
. "gcredstash"
. "github.com/winebarrel/gcredstash/src/gcredstash"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/golang/mock/gomock"
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/driver_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gcredstash

import (
. "gcredstash"
. "github.com/winebarrel/gcredstash/src/gcredstash"
"gcredstash/testutils"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/dynamodb"
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/hex_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gcredstash

import (
. "gcredstash"
. "github.com/winebarrel/gcredstash/src/gcredstash"
"testing"
)

Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/kms_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package gcredstash

import (
"bytes"
. "gcredstash"
. "github.com/winebarrel/gcredstash/src/gcredstash"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/kms"
"github.com/golang/mock/gomock"
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/optparse_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gcredstash

import (
. "gcredstash"
. "github.com/winebarrel/gcredstash/src/gcredstash"
"reflect"
"testing"
)
Expand Down
2 changes: 1 addition & 1 deletion src/gcredstash/utils_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package gcredstash

import (
. "gcredstash"
. "github.com/winebarrel/gcredstash/src/gcredstash"
"testing"
)

Expand Down
Loading

0 comments on commit ee6a45f

Please sign in to comment.