Skip to content

Commit

Permalink
Merge pull request #2 from asecurityteam/go-mod-migration
Browse files Browse the repository at this point in the history
Migrating repo from dep to go modules
  • Loading branch information
aslape authored Aug 15, 2019
2 parents 3294d2b + 80ab91e commit 52e076a
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 146 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
language: go
sudo: false
go:
- 1.11.x
- 1.12.x
services:
- docker
install:
- chmod 777 -R "$(pwd)"
- make dep
script:
- travis_retry make dep
- make lint
- make test
- make integration
Expand Down
108 changes: 0 additions & 108 deletions Gopkg.lock

This file was deleted.

21 changes: 0 additions & 21 deletions Gopkg.toml

This file was deleted.

25 changes: 10 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,39 +1,34 @@
TAG := $(shell git rev-parse --short HEAD)
DIR := $(shell pwd -L)
GOPATH := ${GOPATH}
ifeq ($(GOPATH),)
GOPATH := ${HOME}/go
endif
PROJECT_PATH := $(subst $(GOPATH)/src/,,$(DIR))

dep:
docker run -ti \
--mount src="$(DIR)",target="/go/src/$(PROJECT_PATH)",type="bind" \
-w "/go/src/$(PROJECT_PATH)" \
--mount src="$(DIR)",target="$(DIR)",type="bind" \
-w "$(DIR)" \
asecurityteam/sdcli:v1 go dep

lint:
docker run -ti \
--mount src="$(DIR)",target="/go/src/$(PROJECT_PATH)",type="bind" \
-w "/go/src/$(PROJECT_PATH)" \
--mount src="$(DIR)",target="$(DIR)",type="bind" \
-w "$(DIR)" \
asecurityteam/sdcli:v1 go lint

test:
docker run -ti \
--mount src="$(DIR)",target="/go/src/$(PROJECT_PATH)",type="bind" \
-w "/go/src/$(PROJECT_PATH)" \
--mount src="$(DIR)",target="$(DIR)",type="bind" \
-w "$(DIR)" \
asecurityteam/sdcli:v1 go test

integration:
docker run -ti \
--mount src="$(DIR)",target="/go/src/$(PROJECT_PATH)",type="bind" \
-w "/go/src/$(PROJECT_PATH)" \
--mount src="$(DIR)",target="$(DIR)",type="bind" \
-w "$(DIR)" \
asecurityteam/sdcli:v1 go integration

coverage:
docker run -ti \
--mount src="$(DIR)",target="/go/src/$(PROJECT_PATH)",type="bind" \
-w "/go/src/$(PROJECT_PATH)" \
--mount src="$(DIR)",target="$(DIR)",type="bind" \
-w "$(DIR)" \
asecurityteam/sdcli:v1 go coverage

doc: ;
Expand Down
15 changes: 15 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module github.com/asecurityteam/component-connstate

go 1.12

require (
github.com/asecurityteam/component-stat v0.1.0
github.com/asecurityteam/settings v0.1.0
github.com/go-yaml/yaml v2.1.0+incompatible // indirect
github.com/golang/mock v0.0.0-20190508161146-9fa652df1129
github.com/rs/xhandler v0.0.0-20151224012956-d9d9599b6aaf // indirect
github.com/rs/xstats v0.0.0-20170813190920-c67367528e16 // indirect
github.com/spf13/cast v1.3.0 // indirect
github.com/stretchr/testify v1.3.0
golang.org/x/net v0.0.0-20190628185345-da137c7871d7 // 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/asecurityteam/component-stat v0.1.0 h1:XTrPmQOyvs7iK5iW1ll6W5Eh7ZKDnZnrHtljYq1YAh8=
github.com/asecurityteam/component-stat v0.1.0/go.mod h1:OiwAVfs+FntaUimVzyjfzNf4oiKZxM6L73zfTVqfvdo=
github.com/asecurityteam/settings v0.1.0 h1:W5CA/x0gby2Ilo6zV0GQVqgDdMX7AvcH8lMbrS718Io=
github.com/asecurityteam/settings v0.1.0/go.mod h1:Wb6bajm1AgHtjLP8ecv7RqUTCX1hvrIhgX4sF3Ras8c=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o=
github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0=
github.com/golang/mock v0.0.0-20190508161146-9fa652df1129 h1:eDp2NN315lG5ILa4Oq1UgXZftynfJTZgxZNiejJdJLM=
github.com/golang/mock v0.0.0-20190508161146-9fa652df1129/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rs/xhandler v0.0.0-20151224012956-d9d9599b6aaf h1:Df4QtDSQdFg5jenZonLrGr7iREOI/YAwYp18P7xjwPk=
github.com/rs/xhandler v0.0.0-20151224012956-d9d9599b6aaf/go.mod h1:RvLn4FgxWubrpZHtQLnOf6EwhN2hEMusxZOhcW9H3UQ=
github.com/rs/xstats v0.0.0-20170813190920-c67367528e16 h1:m0aigb++JZXs+tzTO60LOOKSOXWyr7scDxlaSvU6HN8=
github.com/rs/xstats v0.0.0-20170813190920-c67367528e16/go.mod h1:5Cg6M3g+Dp4RSFNYBtjJxxjksZc00LbESra5Sz6fGSU=
github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
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/net v0.0.0-20190628185345-da137c7871d7 h1:rTIdg5QFRR7XCaK4LCjBiPbx8j4DQRpdYMnGn/bJUEU=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/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=
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=

0 comments on commit 52e076a

Please sign in to comment.