From 616c6235877d1f94ccfcabed3c63a0b39e76be4f Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sat, 11 Jan 2020 18:50:57 +0100 Subject: [PATCH 1/6] fix: tests. --- configgtm-v1_3/domain_test.go | 7 ++++--- configgtm-v1_3/service.go | 11 +++++++++-- configgtm-v1_4/domain_test.go | 5 +++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/configgtm-v1_3/domain_test.go b/configgtm-v1_3/domain_test.go index a0a55f42..5621d806 100644 --- a/configgtm-v1_3/domain_test.go +++ b/configgtm-v1_3/domain_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" + "github.com/stretchr/testify/require" "github.com/h2non/gock" "github.com/stretchr/testify/assert" @@ -565,8 +566,8 @@ func TestCreateDomain(t *testing.T) { testDomain := NewDomain(gtmTestDomain, "basic") qArgs := make(map[string]string) - statResponse, _ := testDomain.Create(qArgs) - //assert.NoError(t, err) + statResponse, err := testDomain.Create(qArgs) + require.NoError(t, err) assert.Equal(t, gtmTestDomain, statResponse.Resource.Name) } @@ -745,7 +746,7 @@ func TestUpdateDomain(t *testing.T) { //testDomain.MaxResources = 9999 qArgs := make(map[string]string) statResp, err := testDomain.Update(qArgs) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, statResp.ChangeId, "df6c04e4-6327-4e0f-8872-bfe9fb2693d2") } diff --git a/configgtm-v1_3/service.go b/configgtm-v1_3/service.go index e898e8fe..549781e8 100644 --- a/configgtm-v1_3/service.go +++ b/configgtm-v1_3/service.go @@ -1,10 +1,11 @@ package configgtm import ( - "github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid" - "github.com/sirupsen/logrus" "net/http" "net/http/httputil" + + "github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid" + "github.com/sirupsen/logrus" ) var ( @@ -28,6 +29,9 @@ func Init(config edgegrid.Config) { // Utility func to print http req func printHttpRequest(req *http.Request, body bool) { + if req == nil { + return + } b, err := httputil.DumpRequestOut(req, body) if err == nil { @@ -37,6 +41,9 @@ func printHttpRequest(req *http.Request, body bool) { // Utility func to print http response func printHttpResponse(res *http.Response, body bool) { + if res == nil { + return + } b, err := httputil.DumpResponse(res, body) if err == nil { diff --git a/configgtm-v1_4/domain_test.go b/configgtm-v1_4/domain_test.go index a42349c7..1b4490d5 100644 --- a/configgtm-v1_4/domain_test.go +++ b/configgtm-v1_4/domain_test.go @@ -4,6 +4,7 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" + "github.com/stretchr/testify/require" "github.com/h2non/gock" "github.com/stretchr/testify/assert" @@ -566,7 +567,7 @@ func TestCreateDomain(t *testing.T) { qArgs := make(map[string]string) statResponse, err := testDomain.Create(qArgs) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, gtmTestDomain, statResponse.Resource.Name) } @@ -745,7 +746,7 @@ func TestUpdateDomain(t *testing.T) { //testDomain.MaxResources = 9999 qArgs := make(map[string]string) statResp, err := testDomain.Update(qArgs) - assert.NoError(t, err) + require.NoError(t, err) assert.Equal(t, statResp.ChangeId, "df6c04e4-6327-4e0f-8872-bfe9fb2693d2") } From f4793c58e916c4509462c35b4e222c01deb70b78 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sat, 11 Jan 2020 18:51:29 +0100 Subject: [PATCH 2/6] fix: travis configuration - use only maintained go version. - use cache. - validate go module files. - improve test command. --- .travis.yml | 55 ++++++++++++++++++++++++++--------------------------- go.sum | 2 ++ 2 files changed, 29 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3d65e494..2a1e78b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,37 +1,36 @@ language: go sudo: false -go: - - 1.6 - - 1.7 - - 1.8 - - 1.9 - - "1.10" - - "1.11.x" - - tip -env: - # Install dependencies based on the glide.lock - #- DEPS='' - # Upgrade to the latest dependencies - #- DEPS='-update' - - GO111MODULE=on + +# Fix patching for forks +go_import_path: github.com/akamai/AkamaiOPEN-edgegrid-golang + +cache: + directories: + - $GOPATH/pkg/mod + matrix: fast_finish: true + include: + - go: 1.12.x + - go: 1.13.x + - go: 1.x + - go: tip allow_failures: - # Allow Go 1.6, and tip to fail, as well as whenever we use upgraded dependencies - - go: 1.6 - - go: 1.7 - - go: 1.8 - - go: tip - - env: DEPS='-update' -before_install: - # Fix pathing for forks - - curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - - mkdir -p $HOME/gopath/src/github.com/akamai/AkamaiOPEN-edgegrid-golang - - rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/akamai/AkamaiOPEN-edgegrid-golang/ - - export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/akamai/AkamaiOPEN-edgegrid-golang - - cd $HOME/gopath/src/github.com/akamai/AkamaiOPEN-edgegrid-golang + - go: tip + +env: + global: + - GO111MODULE=on + +install: + - go mod tidy + - git diff --exit-code go.mod + - git diff --exit-code go.sum + - go mod download + script: - - ls -d */ | grep -vE '(examples|testdata|vendor)' | xargs -I {package} go test -v ./{package} + - go test -v ./... + notifications: slack: secure: sf5CrgPZ2UjTmGFg1hbSdEB3GXyBybeoZQDOI/pk1ywId4mjN1HgAFooDaZx9Qn+orhdQny3jMcdx1qyLe9YtV7WhIRGRQWgJiZ7H+6YRCWYNnSopsSDJ91Q/PaQrgsPSIHL+vfSkyW9iDXrT09SK0IOlWHTrrYMcJiiOCkx2QZgIBMASXWzCRFMSxfqDBuZ8FuNMhcYTIEz4xBLO7seAl9+FvQTzpSXXyEwoKeZjLx2J2+9J1onx9ccnb5ioPeICRuiIKlSvu7VfFkDgc8k8luoktKSG+ZRpwcdae8VoQCzyt7OPzI1kSoZZw20gp2oYQcRkwpLBM007JkW2+KQraF5tZ9Ok8C1vG97lsByhd23r022joyTGpD+TZqWfXUX7K461GJJpohWoFlHshOaAwNj37XWKD8REpb0Qj7vABIfH+gXQhlJHBRCfKMRf12ILzU2yUbbQftwcPkcivNHGknEAkHIjWKk5lDH9uC2is5nWJHDCt/h/xa/AfvNbt28Kol+8yexRypnmorTzG9CBHq+pKrm48cBEGUxREiUjN7v5RGgJH+DB5nKkV4nH3P7mvWV+mkDcAXZPhDprplFl1Q7YV56OyjAY+dlpY6xyGopDz9DmmZifqLxR6mP9eSCIeIM9VsDJUwhfnnwyxRuuzZWFa+Adu8kuaBR8RqjcdE= diff --git a/go.sum b/go.sum index 4a45e1ea..90f893e0 100644 --- a/go.sum +++ b/go.sum @@ -45,6 +45,8 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/p golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +gopkg.in/h2non/gock.v1 v1.0.14 h1:fTeu9fcUvSnLNacYvYI54h+1/XEteDyHvrVCZEEEYNM= +gopkg.in/h2non/gock.v1 v1.0.14/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= gopkg.in/h2non/gock.v1 v1.0.15 h1:SzLqcIlb/fDfg7UvukMpNcWsu7sI5tWwL+KCATZqks0= gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= gopkg.in/ini.v1 v1.44.0 h1:YRJzTUp0kSYWUVFF5XAbDFfyiqwsl0Vb9R8TVP5eRi0= From 8a8887104e994831a44a2936885654536df706d0 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sat, 11 Jan 2020 18:54:05 +0100 Subject: [PATCH 3/6] fix: remove github.com/h2non/gock imports - use gopkg.in/h2non/gock.v1 --- configgtm-v1_3/asmap_test.go | 2 +- configgtm-v1_3/cidrmap_test.go | 2 +- configgtm-v1_3/datacenter_test.go | 2 +- configgtm-v1_3/domain_test.go | 2 +- configgtm-v1_3/geomap_test.go | 2 +- configgtm-v1_3/property_test.go | 2 +- configgtm-v1_3/resource_test.go | 2 +- configgtm-v1_4/asmap_test.go | 2 +- configgtm-v1_4/cidrmap_test.go | 2 +- configgtm-v1_4/datacenter_test.go | 2 +- configgtm-v1_4/domain_test.go | 2 +- configgtm-v1_4/geomap_test.go | 2 +- configgtm-v1_4/property_test.go | 2 +- configgtm-v1_4/resource_test.go | 2 +- go.mod | 5 ++--- go.sum | 2 -- 16 files changed, 16 insertions(+), 19 deletions(-) diff --git a/configgtm-v1_3/asmap_test.go b/configgtm-v1_3/asmap_test.go index 629f5ee0..f52727fa 100644 --- a/configgtm-v1_3/asmap_test.go +++ b/configgtm-v1_3/asmap_test.go @@ -5,8 +5,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid" "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" - "github.com/h2non/gock" "github.com/stretchr/testify/assert" + "gopkg.in/h2non/gock.v1" ) var ( diff --git a/configgtm-v1_3/cidrmap_test.go b/configgtm-v1_3/cidrmap_test.go index fc16007d..c6ad1d6f 100644 --- a/configgtm-v1_3/cidrmap_test.go +++ b/configgtm-v1_3/cidrmap_test.go @@ -5,8 +5,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" - "github.com/h2non/gock" "github.com/stretchr/testify/assert" + "gopkg.in/h2non/gock.v1" ) var GtmTestCidrMap = "testCidrMap" diff --git a/configgtm-v1_3/datacenter_test.go b/configgtm-v1_3/datacenter_test.go index 6b8f082a..37e1abff 100644 --- a/configgtm-v1_3/datacenter_test.go +++ b/configgtm-v1_3/datacenter_test.go @@ -5,8 +5,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" - "github.com/h2non/gock" "github.com/stretchr/testify/assert" + "gopkg.in/h2non/gock.v1" "fmt" ) diff --git a/configgtm-v1_3/domain_test.go b/configgtm-v1_3/domain_test.go index 5621d806..e6260884 100644 --- a/configgtm-v1_3/domain_test.go +++ b/configgtm-v1_3/domain_test.go @@ -6,8 +6,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" "github.com/stretchr/testify/require" - "github.com/h2non/gock" "github.com/stretchr/testify/assert" + "gopkg.in/h2non/gock.v1" ) func instantiateDomain() *Domain { diff --git a/configgtm-v1_3/geomap_test.go b/configgtm-v1_3/geomap_test.go index cb9e1263..a0647ede 100644 --- a/configgtm-v1_3/geomap_test.go +++ b/configgtm-v1_3/geomap_test.go @@ -5,8 +5,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" - "github.com/h2non/gock" "github.com/stretchr/testify/assert" + "gopkg.in/h2non/gock.v1" ) var GtmTestGeoMap = "testGeoMap" diff --git a/configgtm-v1_3/property_test.go b/configgtm-v1_3/property_test.go index 9ac1dc57..e5b19c30 100644 --- a/configgtm-v1_3/property_test.go +++ b/configgtm-v1_3/property_test.go @@ -5,8 +5,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" - "github.com/h2non/gock" "github.com/stretchr/testify/assert" + "gopkg.in/h2non/gock.v1" "fmt" ) diff --git a/configgtm-v1_3/resource_test.go b/configgtm-v1_3/resource_test.go index fc6b9468..90eb7da9 100644 --- a/configgtm-v1_3/resource_test.go +++ b/configgtm-v1_3/resource_test.go @@ -5,8 +5,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" - "github.com/h2non/gock" "github.com/stretchr/testify/assert" + "gopkg.in/h2non/gock.v1" ) var GtmTestResource = "testResource" diff --git a/configgtm-v1_4/asmap_test.go b/configgtm-v1_4/asmap_test.go index 6ce8d74d..e97654de 100644 --- a/configgtm-v1_4/asmap_test.go +++ b/configgtm-v1_4/asmap_test.go @@ -5,8 +5,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid" "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" - "github.com/h2non/gock" "github.com/stretchr/testify/assert" + "gopkg.in/h2non/gock.v1" ) var ( diff --git a/configgtm-v1_4/cidrmap_test.go b/configgtm-v1_4/cidrmap_test.go index 1ab9d0b4..8b63fa03 100644 --- a/configgtm-v1_4/cidrmap_test.go +++ b/configgtm-v1_4/cidrmap_test.go @@ -5,8 +5,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" - "github.com/h2non/gock" "github.com/stretchr/testify/assert" + "gopkg.in/h2non/gock.v1" ) var GtmTestCidrMap = "testCidrMap" diff --git a/configgtm-v1_4/datacenter_test.go b/configgtm-v1_4/datacenter_test.go index 5f644958..f69c3672 100644 --- a/configgtm-v1_4/datacenter_test.go +++ b/configgtm-v1_4/datacenter_test.go @@ -5,8 +5,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" - "github.com/h2non/gock" "github.com/stretchr/testify/assert" + "gopkg.in/h2non/gock.v1" "fmt" ) diff --git a/configgtm-v1_4/domain_test.go b/configgtm-v1_4/domain_test.go index 1b4490d5..8bc9afb9 100644 --- a/configgtm-v1_4/domain_test.go +++ b/configgtm-v1_4/domain_test.go @@ -6,8 +6,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" "github.com/stretchr/testify/require" - "github.com/h2non/gock" "github.com/stretchr/testify/assert" + "gopkg.in/h2non/gock.v1" ) func instantiateDomain() *Domain { diff --git a/configgtm-v1_4/geomap_test.go b/configgtm-v1_4/geomap_test.go index 66760a9d..73907b5e 100644 --- a/configgtm-v1_4/geomap_test.go +++ b/configgtm-v1_4/geomap_test.go @@ -5,8 +5,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" - "github.com/h2non/gock" "github.com/stretchr/testify/assert" + "gopkg.in/h2non/gock.v1" ) var GtmTestGeoMap = "testGeoMap" diff --git a/configgtm-v1_4/property_test.go b/configgtm-v1_4/property_test.go index df52d497..594accab 100644 --- a/configgtm-v1_4/property_test.go +++ b/configgtm-v1_4/property_test.go @@ -5,8 +5,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" - "github.com/h2non/gock" "github.com/stretchr/testify/assert" + "gopkg.in/h2non/gock.v1" "fmt" ) diff --git a/configgtm-v1_4/resource_test.go b/configgtm-v1_4/resource_test.go index b80297b9..9754963a 100644 --- a/configgtm-v1_4/resource_test.go +++ b/configgtm-v1_4/resource_test.go @@ -5,8 +5,8 @@ import ( "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" - "github.com/h2non/gock" "github.com/stretchr/testify/assert" + "gopkg.in/h2non/gock.v1" ) var GtmTestResource = "testResource" diff --git a/go.mod b/go.mod index 8b49e41b..10b88848 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,11 @@ module github.com/akamai/AkamaiOPEN-edgegrid-golang +go 1.12 + require ( github.com/go-ini/ini v1.44.0 github.com/google/go-querystring v1.0.0 github.com/google/uuid v1.1.1 - github.com/h2non/gock v0.0.0-00010101000000-000000000000 github.com/mitchellh/go-homedir v1.1.0 github.com/sirupsen/logrus v1.4.2 github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect @@ -15,5 +16,3 @@ require ( gopkg.in/h2non/gock.v1 v1.0.15 gopkg.in/ini.v1 v1.44.0 // indirect ) - -replace github.com/h2non/gock => gopkg.in/h2non/gock.v1 v1.0.14 diff --git a/go.sum b/go.sum index 90f893e0..4a45e1ea 100644 --- a/go.sum +++ b/go.sum @@ -45,8 +45,6 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/p golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -gopkg.in/h2non/gock.v1 v1.0.14 h1:fTeu9fcUvSnLNacYvYI54h+1/XEteDyHvrVCZEEEYNM= -gopkg.in/h2non/gock.v1 v1.0.14/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= gopkg.in/h2non/gock.v1 v1.0.15 h1:SzLqcIlb/fDfg7UvukMpNcWsu7sI5tWwL+KCATZqks0= gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= gopkg.in/ini.v1 v1.44.0 h1:YRJzTUp0kSYWUVFF5XAbDFfyiqwsl0Vb9R8TVP5eRi0= From f9895fc83c70850c55ef3ebab144265ef8056af8 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sat, 11 Jan 2020 18:59:10 +0100 Subject: [PATCH 4/6] doc: remove dead documentation. --- README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/README.md b/README.md index b478b8e0..1fc9ebbb 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,6 @@ This library implements an Authentication handler for [net/http](https://golang. that provides the [Akamai OPEN Edgegrid Authentication](https://developer.akamai.com/introduction/Client_Auth.html) scheme. For more information visit the [Akamai OPEN Developer Community](https://developer.akamai.com). -## Installation - -This package uses `dep` to manage to dependencies and installation. To install `dep`, see the [`dep` install documentation](https://github.com/golang/dep#installation) - -```bash -$ dep ensure -add github.com/akamai/AkamaiOPEN-edgegrid-golang -``` - ## Usage GET Example: From 5783f890777931ce9193812c1ff954f5278591b1 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sat, 11 Jan 2020 19:02:28 +0100 Subject: [PATCH 5/6] chore: sort imports. --- configgtm-v1_3/domain_test.go | 2 +- configgtm-v1_4/domain_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configgtm-v1_3/domain_test.go b/configgtm-v1_3/domain_test.go index e6260884..5cd1c4d7 100644 --- a/configgtm-v1_3/domain_test.go +++ b/configgtm-v1_3/domain_test.go @@ -4,9 +4,9 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "gopkg.in/h2non/gock.v1" ) diff --git a/configgtm-v1_4/domain_test.go b/configgtm-v1_4/domain_test.go index 8bc9afb9..43eb38ea 100644 --- a/configgtm-v1_4/domain_test.go +++ b/configgtm-v1_4/domain_test.go @@ -4,9 +4,9 @@ import ( "testing" "github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1" - "github.com/stretchr/testify/require" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "gopkg.in/h2non/gock.v1" ) From 80a9679986e74bc6ad61032588d479ac7fffec39 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Sat, 11 Jan 2020 19:19:37 +0100 Subject: [PATCH 6/6] fix: use only one version of go-ini/ini --- edgegrid.go | 2 +- edgegrid/config.go | 2 +- go.mod | 11 ++++------- go.sum | 20 ++++++++++++-------- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/edgegrid.go b/edgegrid.go index 3da6eed0..6647ecd7 100644 --- a/edgegrid.go +++ b/edgegrid.go @@ -18,10 +18,10 @@ import ( "time" "unicode" - "github.com/go-ini/ini" "github.com/google/uuid" "github.com/mitchellh/go-homedir" log "github.com/sirupsen/logrus" + "gopkg.in/ini.v1" ) const defaultSection = "DEFAULT" diff --git a/edgegrid/config.go b/edgegrid/config.go index 2bb247cc..aff215e6 100644 --- a/edgegrid/config.go +++ b/edgegrid/config.go @@ -6,8 +6,8 @@ import ( "strconv" "strings" - "github.com/go-ini/ini" "github.com/mitchellh/go-homedir" + "gopkg.in/ini.v1" ) // Config struct provides all the necessary fields to diff --git a/go.mod b/go.mod index 10b88848..76a1b75b 100644 --- a/go.mod +++ b/go.mod @@ -3,16 +3,13 @@ module github.com/akamai/AkamaiOPEN-edgegrid-golang go 1.12 require ( - github.com/go-ini/ini v1.44.0 github.com/google/go-querystring v1.0.0 github.com/google/uuid v1.1.1 github.com/mitchellh/go-homedir v1.1.0 github.com/sirupsen/logrus v1.4.2 - github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect - github.com/stretchr/testify v1.3.0 - github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect - github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect - github.com/xeipuuv/gojsonschema v1.1.0 + github.com/smartystreets/goconvey v1.6.4 // indirect + github.com/stretchr/testify v1.4.0 + github.com/xeipuuv/gojsonschema v1.2.0 gopkg.in/h2non/gock.v1 v1.0.15 - gopkg.in/ini.v1 v1.44.0 // indirect + gopkg.in/ini.v1 v1.51.1 ) diff --git a/go.sum b/go.sum index 4a45e1ea..e18f1152 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,6 @@ 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-ini/ini v1.44.0 h1:8+SRbfpRFlIunpSum4BEf1ClTtVjOgKzgBv9pHFkI6w= -github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= 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/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= @@ -25,19 +23,21 @@ github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4 github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a h1:pa8hGb/2YqsZKovtsgrwcDH1RZhVbTKCjLp47XpqCDs= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/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= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v1.1.0 h1:ngVtJC9TY/lg0AA/1k48FYhBrhRoFlEmWzsehpNAaZg= -github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= 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/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -45,7 +45,11 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/p golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/h2non/gock.v1 v1.0.15 h1:SzLqcIlb/fDfg7UvukMpNcWsu7sI5tWwL+KCATZqks0= gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE= -gopkg.in/ini.v1 v1.44.0 h1:YRJzTUp0kSYWUVFF5XAbDFfyiqwsl0Vb9R8TVP5eRi0= -gopkg.in/ini.v1 v1.44.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.51.1 h1:GyboHr4UqMiLUybYjd22ZjQIKEJEpgtLXtuGbR21Oho= +gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=