From bb8d18b3f0f4ba852b3f8b599f38c5ddec6755ac Mon Sep 17 00:00:00 2001 From: Neur0toxine Date: Fri, 16 Apr 2021 14:17:04 +0300 Subject: [PATCH] switch to go modules --- .github/workflows/ci.yml | 14 +++----------- go.mod | 9 +++++++++ go.sum | 19 +++++++++++++++++++ v5/client_test.go | 2 +- 4 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 go.mod create mode 100644 go.sum diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7642ede..5d2798a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,15 +27,10 @@ jobs: go-version: '^1' - name: Get dependencies run: | - go get -v github.com/google/go-querystring/query - go get -v gopkg.in/h2non/gock.v1 - go get -v github.com/joho/godotenv - go get -v github.com/retailcrm/api-client-go/errs + go mod tidy cp .env.dist .env - name: Lint code with golangci-lint uses: golangci/golangci-lint-action@v2 - env: - GO111MODULE: off with: version: v1.39 only-new-issues: true @@ -46,7 +41,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: ['1.8', '1.9', '1.10', '1.11', '1.12', '1.13'] + go-version: ['1.11', '1.12', '1.13', '1.14', '1.15', '1.16'] include: - go-version: '1.14' coverage: 1 @@ -59,10 +54,7 @@ jobs: uses: actions/checkout@v2 - name: Get dependencies run: | - go get -v github.com/google/go-querystring/query - go get -v gopkg.in/h2non/gock.v1 - go get -v github.com/joho/godotenv - go get -v github.com/retailcrm/api-client-go/errs + go mod tidy cp .env.dist .env - name: Tests env: diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..2c5d926 --- /dev/null +++ b/go.mod @@ -0,0 +1,9 @@ +module github.com/retailcrm/api-client-go + +go 1.13 + +require ( + github.com/google/go-querystring v1.1.0 + github.com/joho/godotenv v1.3.0 + gopkg.in/h2non/gock.v1 v1.0.16 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..98208cf --- /dev/null +++ b/go.sum @@ -0,0 +1,19 @@ +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= +github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= +github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32 h1:W6apQkHrMkS0Muv8G/TipAy/FJl/rCYT0+EuS8+Z0z4= +github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32/go.mod h1:9wM+0iRr9ahx58uYLpLIr5fm8diHn0JbqRycJi6w0Ms= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +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/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/h2non/gentleman.v1 v1.0.4/go.mod h1:JYuHVdFzS4MKOXe0o+chKJ4hCe6tqKKw9XH9YP6WFrg= +gopkg.in/h2non/gock.v1 v1.0.16 h1:F11k+OafeuFENsjei5t2vMTSTs9L62AdyTe4E1cgdG8= +gopkg.in/h2non/gock.v1 v1.0.16/go.mod h1:XVuDAssexPLwgxCLMvDTWNU5eqklsydR6I5phZ9oPB8= diff --git a/v5/client_test.go b/v5/client_test.go index 1fa472f..0e132a2 100644 --- a/v5/client_test.go +++ b/v5/client_test.go @@ -16,7 +16,7 @@ import ( "time" "github.com/joho/godotenv" - "gopkg.in/h2non/gock.v1" + gock "gopkg.in/h2non/gock.v1" ) func TestMain(m *testing.M) {