aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2019-10-20 11:50:37 +0200
committerMartin Polden <mpolden@mpolden.no>2019-10-20 11:50:37 +0200
commit76cddd000f3a008be25929ed6636229f60ba9718 (patch)
tree18eca6ed5f03eb267745d6f03104397b82cc54f3
parent806cf5bc50f635e4a6d2591b9ebf45e1d55b3c3b (diff)
Build with modules
-rw-r--r--.travis.yml6
-rw-r--r--Makefile13
-rw-r--r--github/github.go2
-rw-r--r--github/github_test.go2
-rw-r--r--go.mod8
-rw-r--r--go.sum15
-rw-r--r--main.go3
7 files changed, 37 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml
index 04edda9..0986ccc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,7 @@
language: go
go:
- - 1.x
- - tip
+ - stable
+
+env:
+ - GO111MODULE=on
diff --git a/Makefile b/Makefile
index 90445dc..e05ad1b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,4 @@
-all: deps test vet install
-
-fmt:
- go fmt ./...
+all: lint test install
test:
go test ./...
@@ -9,8 +6,10 @@ test:
vet:
go vet ./...
-deps:
- go get -d -v ./...
+check-fmt:
+ bash -c "diff --line-format='%L' <(echo -n) <(gofmt -d -s .)"
+
+lint: check-fmt vet
install:
- go install
+ go install ./...
diff --git a/github/github.go b/github/github.go
index 3d39488..0dea270 100644
--- a/github/github.go
+++ b/github/github.go
@@ -4,7 +4,7 @@ import (
"context"
"fmt"
- "github.com/google/go-github/github"
+ "github.com/google/go-github/v28/github"
)
type Client struct {
diff --git a/github/github_test.go b/github/github_test.go
index b400976..3c4705f 100644
--- a/github/github_test.go
+++ b/github/github_test.go
@@ -3,7 +3,7 @@ package github
import (
"testing"
- "github.com/google/go-github/github"
+ "github.com/google/go-github/v28/github"
)
func TestCloneURL(t *testing.T) {
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..27e85d5
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,8 @@
+module github.com/mpolden/ghm
+
+go 1.13
+
+require (
+ github.com/google/go-github/v28 v28.1.1
+ github.com/jessevdk/go-flags v1.4.0
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..8b9b95d
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,15 @@
+github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
+github.com/google/go-github/v28 v28.1.1 h1:kORf5ekX5qwXO2mGzXXOjMe/g6ap8ahVe0sBEulhSxo=
+github.com/google/go-github/v28 v28.1.1/go.mod h1:bsqJWQX05omyWVmc00nEUql9mhQyv38lDZ8kPZcQVoM=
+github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
+github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
+github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA=
+github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M=
+golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
+golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
+golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
diff --git a/main.go b/main.go
index 0e3d93a..585a469 100644
--- a/main.go
+++ b/main.go
@@ -8,7 +8,8 @@ import (
"strings"
"sync"
- "github.com/google/go-github/github"
+ "github.com/google/go-github/v28/github"
+
flags "github.com/jessevdk/go-flags"
"github.com/mpolden/ghm/git"
gh "github.com/mpolden/ghm/github"