From 80ab91e6b448058368c14ff1b5273a393b704fea Mon Sep 17 00:00:00 2001 From: Alex Slape Date: Wed, 14 Aug 2019 10:32:29 -0500 Subject: [PATCH] Migrating repo from dep to go modules --- .travis.yml | 4 +- Gopkg.lock | 108 ---------------------------------------------------- Gopkg.toml | 21 ---------- Makefile | 25 +++++------- go.mod | 15 ++++++++ go.sum | 31 +++++++++++++++ 6 files changed, 58 insertions(+), 146 deletions(-) delete mode 100644 Gopkg.lock delete mode 100644 Gopkg.toml create mode 100644 go.mod create mode 100644 go.sum diff --git a/.travis.yml b/.travis.yml index 27ad04e..f3d834f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 59993bc..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,108 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:535f5aab9d8b2a9451d81673b6bcdb342a304fb8de506a11b08ae0fe0e7f24f7" - name = "github.com/asecurityteam/component-stat" - packages = ["."] - pruneopts = "UT" - revision = "4175403694f83e388be7d0f20404aee8cbb64916" - version = "v0.1.0" - -[[projects]] - digest = "1:391bbf4e67d50d74c1bb7dfad79222181327ff6d9a32324ed022b12051b5d5e8" - name = "github.com/asecurityteam/settings" - packages = ["."] - pruneopts = "UT" - revision = "d4142d59861b3779aeba32111096d43ae940e49d" - version = "v0.1.0" - -[[projects]] - digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" - name = "github.com/davecgh/go-spew" - packages = ["spew"] - pruneopts = "UT" - revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" - version = "v1.1.1" - -[[projects]] - digest = "1:4d2e5a73dc1500038e504a8d78b986630e3626dc027bc030ba5c75da257cdb96" - name = "github.com/go-yaml/yaml" - packages = ["."] - pruneopts = "UT" - revision = "51d6538a90f86fe93ac480b35f37b2be17fef232" - version = "v2.2.2" - -[[projects]] - digest = "1:be408f349cae090a7c17a279633d6e62b00068e64af66a582cae0983de8890ea" - name = "github.com/golang/mock" - packages = ["gomock"] - pruneopts = "UT" - revision = "9fa652df1129bef0e734c9cf9bf6dbae9ef3b9fa" - version = "1.3.1" - -[[projects]] - digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - pruneopts = "UT" - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - digest = "1:9665a593c0199c193341b8b110e31b19c899923711fc70bde2c2f3eb2d337526" - name = "github.com/rs/xhandler" - packages = ["."] - pruneopts = "UT" - revision = "d9d9599b6aaf6a058cb7b1f48291ded2cbd13390" - version = "v1.0" - -[[projects]] - branch = "master" - digest = "1:b312ce0585169062a8b55dd8ad9bacd54cc98b056670b8638da86b5535ebcd41" - name = "github.com/rs/xstats" - packages = [ - ".", - "dogstatsd", - ] - pruneopts = "UT" - revision = "c67367528e160e557423e4d87059614d8c31a582" - -[[projects]] - digest = "1:08d65904057412fc0270fc4812a1c90c594186819243160dc779a402d4b6d0bc" - name = "github.com/spf13/cast" - packages = ["."] - pruneopts = "UT" - revision = "8c9545af88b134710ab1cd196795e7f2388358d7" - version = "v1.3.0" - -[[projects]] - digest = "1:5da8ce674952566deae4dbc23d07c85caafc6cfa815b0b3e03e41979cedb8750" - name = "github.com/stretchr/testify" - packages = [ - "assert", - "require", - ] - pruneopts = "UT" - revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053" - version = "v1.3.0" - -[[projects]] - branch = "master" - digest = "1:76ee51c3f468493aff39dbacc401e8831fbb765104cbf613b89bef01cf4bad70" - name = "golang.org/x/net" - packages = ["context"] - pruneopts = "UT" - revision = "da137c7871d730100384dbcf36e6f8fa493aef5b" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "github.com/asecurityteam/component-stat", - "github.com/asecurityteam/settings", - "github.com/golang/mock/gomock", - "github.com/stretchr/testify/require", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index d38c9fc..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,21 +0,0 @@ -# Gopkg.toml example - -[prune] - go-tests = true - unused-packages = true - -[[constraint]] - name = "github.com/asecurityteam/settings" - version = "^0.1.0" - -[[constraint]] - name = "github.com/asecurityteam/component-stat" - version = "^0.1.0" - -[[constraint]] - name = "github.com/stretchr/testify" - version = "^1.3.0" - -[[constraint]] - name = "github.com/golang/mock" - version = "^1.3.1" diff --git a/Makefile b/Makefile index c1cf289..edab789 100644 --- a/Makefile +++ b/Makefile @@ -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: ; diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..afb7483 --- /dev/null +++ b/go.mod @@ -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 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..14c6a70 --- /dev/null +++ b/go.sum @@ -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=