From ec2d1cf3092da685f05a9a38dd0e87620792269b Mon Sep 17 00:00:00 2001 From: Lenny Goodell <44779287+lenny-intel@users.noreply.github.com> Date: Wed, 20 Jan 2021 08:45:15 -0700 Subject: [PATCH] refactor: Consume V2 Go Modules for edgex go-mods (#155) closes #154 Signed-off-by: lenny --- bootstrap/bootstrap.go | 6 +++--- bootstrap/config/config.go | 6 +++--- bootstrap/config/provider.go | 2 +- bootstrap/config/provider_test.go | 2 +- bootstrap/container/logging.go | 2 +- bootstrap/container/registry.go | 2 +- bootstrap/container/token.go | 2 +- bootstrap/environment/variables.go | 6 +++--- bootstrap/environment/variables_test.go | 6 +++--- bootstrap/handlers/secret.go | 8 ++++---- bootstrap/handlers/secret_test.go | 6 +++--- bootstrap/registration/registry.go | 8 ++++---- bootstrap/registration/registry_test.go | 2 +- bootstrap/secret/insecure.go | 2 +- bootstrap/secret/insecure_test.go | 2 +- bootstrap/secret/secure.go | 6 +++--- bootstrap/secret/secure_test.go | 10 +++++----- config/types.go | 4 ++-- go.mod | 8 ++++---- 19 files changed, 45 insertions(+), 45 deletions(-) diff --git a/bootstrap/bootstrap.go b/bootstrap/bootstrap.go index 9816035f..3e4822c0 100644 --- a/bootstrap/bootstrap.go +++ b/bootstrap/bootstrap.go @@ -31,10 +31,10 @@ import ( "github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/startup" "github.com/edgexfoundry/go-mod-bootstrap/v2/di" - "github.com/edgexfoundry/go-mod-registry/registry" + "github.com/edgexfoundry/go-mod-registry/v2/registry" - "github.com/edgexfoundry/go-mod-core-contracts/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/models" + "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v2/models" ) // Deferred defines the signature of a function returned by RunAndReturnWaitGroup that should be executed via defer. diff --git a/bootstrap/config/config.go b/bootstrap/config/config.go index 9ace9329..ecc9b786 100644 --- a/bootstrap/config/config.go +++ b/bootstrap/config/config.go @@ -30,10 +30,10 @@ import ( "github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/startup" "github.com/edgexfoundry/go-mod-bootstrap/v2/di" - "github.com/edgexfoundry/go-mod-configuration/configuration" - "github.com/edgexfoundry/go-mod-configuration/pkg/types" + "github.com/edgexfoundry/go-mod-configuration/v2/configuration" + "github.com/edgexfoundry/go-mod-configuration/v2/pkg/types" - "github.com/edgexfoundry/go-mod-core-contracts/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" "github.com/BurntSushi/toml" ) diff --git a/bootstrap/config/provider.go b/bootstrap/config/provider.go index 71fbb3d3..ae67f3ad 100644 --- a/bootstrap/config/provider.go +++ b/bootstrap/config/provider.go @@ -14,7 +14,7 @@ package config import ( - "github.com/edgexfoundry/go-mod-configuration/pkg/types" + "github.com/edgexfoundry/go-mod-configuration/v2/pkg/types" "github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/environment" ) diff --git a/bootstrap/config/provider_test.go b/bootstrap/config/provider_test.go index 6554e836..678829fe 100644 --- a/bootstrap/config/provider_test.go +++ b/bootstrap/config/provider_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/require" "github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/environment" - "github.com/edgexfoundry/go-mod-core-contracts/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" ) const ( diff --git a/bootstrap/container/logging.go b/bootstrap/container/logging.go index d8391246..79305480 100644 --- a/bootstrap/container/logging.go +++ b/bootstrap/container/logging.go @@ -15,7 +15,7 @@ package container import ( - "github.com/edgexfoundry/go-mod-core-contracts/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" "github.com/edgexfoundry/go-mod-bootstrap/v2/di" ) diff --git a/bootstrap/container/registry.go b/bootstrap/container/registry.go index 93984c21..65e77990 100644 --- a/bootstrap/container/registry.go +++ b/bootstrap/container/registry.go @@ -17,7 +17,7 @@ package container import ( "github.com/edgexfoundry/go-mod-bootstrap/v2/di" - "github.com/edgexfoundry/go-mod-registry/registry" + "github.com/edgexfoundry/go-mod-registry/v2/registry" ) // RegistryClientInterfaceName contains the name of the registry.Client implementation in the DIC. diff --git a/bootstrap/container/token.go b/bootstrap/container/token.go index fc70fb58..0db6a5e8 100644 --- a/bootstrap/container/token.go +++ b/bootstrap/container/token.go @@ -15,7 +15,7 @@ package container import ( - "github.com/edgexfoundry/go-mod-secrets/pkg/token/authtokenloader" + "github.com/edgexfoundry/go-mod-secrets/v2/pkg/token/authtokenloader" "github.com/edgexfoundry/go-mod-bootstrap/v2/di" ) diff --git a/bootstrap/environment/variables.go b/bootstrap/environment/variables.go index 5b2777e5..d045035a 100644 --- a/bootstrap/environment/variables.go +++ b/bootstrap/environment/variables.go @@ -22,10 +22,10 @@ import ( "strconv" "strings" - "github.com/edgexfoundry/go-mod-core-contracts/clients/logger" - "github.com/edgexfoundry/go-mod-core-contracts/models" + "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v2/models" - "github.com/edgexfoundry/go-mod-configuration/pkg/types" + "github.com/edgexfoundry/go-mod-configuration/v2/pkg/types" "github.com/pelletier/go-toml" ) diff --git a/bootstrap/environment/variables_test.go b/bootstrap/environment/variables_test.go index cf718b2c..f1bbd2c6 100644 --- a/bootstrap/environment/variables_test.go +++ b/bootstrap/environment/variables_test.go @@ -23,9 +23,9 @@ import ( "github.com/edgexfoundry/go-mod-bootstrap/v2/config" - "github.com/edgexfoundry/go-mod-configuration/pkg/types" - "github.com/edgexfoundry/go-mod-core-contracts/clients/logger" - secretsTypes "github.com/edgexfoundry/go-mod-secrets/pkg/types" + "github.com/edgexfoundry/go-mod-configuration/v2/pkg/types" + "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" + secretsTypes "github.com/edgexfoundry/go-mod-secrets/v2/pkg/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/bootstrap/handlers/secret.go b/bootstrap/handlers/secret.go index b9ef0e36..dc48789c 100644 --- a/bootstrap/handlers/secret.go +++ b/bootstrap/handlers/secret.go @@ -25,11 +25,11 @@ import ( "github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/startup" "github.com/edgexfoundry/go-mod-bootstrap/v2/config" "github.com/edgexfoundry/go-mod-bootstrap/v2/di" - "github.com/edgexfoundry/go-mod-secrets/pkg/types" - "github.com/edgexfoundry/go-mod-secrets/secrets" + "github.com/edgexfoundry/go-mod-secrets/v2/pkg/types" + "github.com/edgexfoundry/go-mod-secrets/v2/secrets" - "github.com/edgexfoundry/go-mod-secrets/pkg/token/authtokenloader" - "github.com/edgexfoundry/go-mod-secrets/pkg/token/fileioperformer" + "github.com/edgexfoundry/go-mod-secrets/v2/pkg/token/authtokenloader" + "github.com/edgexfoundry/go-mod-secrets/v2/pkg/token/fileioperformer" ) // SecureProviderBootstrapHandler full initializes the Secret Provider. diff --git a/bootstrap/handlers/secret_test.go b/bootstrap/handlers/secret_test.go index 9fa05a07..fb18fa58 100644 --- a/bootstrap/handlers/secret_test.go +++ b/bootstrap/handlers/secret_test.go @@ -30,9 +30,9 @@ import ( "github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/startup" bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v2/config" "github.com/edgexfoundry/go-mod-bootstrap/v2/di" - "github.com/edgexfoundry/go-mod-core-contracts/clients/logger" - "github.com/edgexfoundry/go-mod-secrets/pkg/token/authtokenloader/mocks" - "github.com/edgexfoundry/go-mod-secrets/pkg/types" + "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v2/pkg/token/authtokenloader/mocks" + "github.com/edgexfoundry/go-mod-secrets/v2/pkg/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/bootstrap/registration/registry.go b/bootstrap/registration/registry.go index 3594faab..30595168 100644 --- a/bootstrap/registration/registry.go +++ b/bootstrap/registration/registry.go @@ -20,10 +20,10 @@ import ( "errors" "fmt" - "github.com/edgexfoundry/go-mod-core-contracts/clients" - "github.com/edgexfoundry/go-mod-core-contracts/clients/logger" - registryTypes "github.com/edgexfoundry/go-mod-registry/pkg/types" - "github.com/edgexfoundry/go-mod-registry/registry" + "github.com/edgexfoundry/go-mod-core-contracts/v2/clients" + "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" + registryTypes "github.com/edgexfoundry/go-mod-registry/v2/pkg/types" + "github.com/edgexfoundry/go-mod-registry/v2/registry" "github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/interfaces" "github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/startup" diff --git a/bootstrap/registration/registry_test.go b/bootstrap/registration/registry_test.go index 9d0f4f64..e313bd01 100644 --- a/bootstrap/registration/registry_test.go +++ b/bootstrap/registration/registry_test.go @@ -21,7 +21,7 @@ import ( "github.com/edgexfoundry/go-mod-bootstrap/v2/config" - "github.com/edgexfoundry/go-mod-core-contracts/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/bootstrap/secret/insecure.go b/bootstrap/secret/insecure.go index 02179503..9cfe79d0 100644 --- a/bootstrap/secret/insecure.go +++ b/bootstrap/secret/insecure.go @@ -22,7 +22,7 @@ import ( "time" "github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" ) // InsecureProvider implements the SecretProvider interface for insecure secrets diff --git a/bootstrap/secret/insecure_test.go b/bootstrap/secret/insecure_test.go index d89398fb..adc7f936 100644 --- a/bootstrap/secret/insecure_test.go +++ b/bootstrap/secret/insecure_test.go @@ -19,7 +19,7 @@ import ( "time" bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v2/config" - "github.com/edgexfoundry/go-mod-core-contracts/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/bootstrap/secret/secure.go b/bootstrap/secret/secure.go index a6453abd..971f68d7 100644 --- a/bootstrap/secret/secure.go +++ b/bootstrap/secret/secure.go @@ -20,9 +20,9 @@ import ( "fmt" "github.com/edgexfoundry/go-mod-bootstrap/v2/bootstrap/interfaces" - "github.com/edgexfoundry/go-mod-core-contracts/clients/logger" - "github.com/edgexfoundry/go-mod-secrets/pkg/token/authtokenloader" - "github.com/edgexfoundry/go-mod-secrets/secrets" + "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v2/pkg/token/authtokenloader" + "github.com/edgexfoundry/go-mod-secrets/v2/secrets" "sync" "time" diff --git a/bootstrap/secret/secure_test.go b/bootstrap/secret/secure_test.go index ad398636..9e9cc066 100644 --- a/bootstrap/secret/secure_test.go +++ b/bootstrap/secret/secure_test.go @@ -20,11 +20,11 @@ import ( "time" bootstrapConfig "github.com/edgexfoundry/go-mod-bootstrap/v2/config" - "github.com/edgexfoundry/go-mod-core-contracts/clients/logger" - "github.com/edgexfoundry/go-mod-secrets/pkg" - mocks2 "github.com/edgexfoundry/go-mod-secrets/pkg/token/authtokenloader/mocks" - "github.com/edgexfoundry/go-mod-secrets/secrets" - "github.com/edgexfoundry/go-mod-secrets/secrets/mocks" + "github.com/edgexfoundry/go-mod-core-contracts/v2/clients/logger" + "github.com/edgexfoundry/go-mod-secrets/v2/pkg" + mocks2 "github.com/edgexfoundry/go-mod-secrets/v2/pkg/token/authtokenloader/mocks" + "github.com/edgexfoundry/go-mod-secrets/v2/secrets" + "github.com/edgexfoundry/go-mod-secrets/v2/secrets/mocks" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/config/types.go b/config/types.go index 8768dff3..44839d3e 100644 --- a/config/types.go +++ b/config/types.go @@ -18,8 +18,8 @@ import ( "fmt" "time" - "github.com/edgexfoundry/go-mod-core-contracts/clients" - "github.com/edgexfoundry/go-mod-secrets/pkg/types" + "github.com/edgexfoundry/go-mod-core-contracts/v2/clients" + "github.com/edgexfoundry/go-mod-secrets/v2/pkg/types" ) // ServiceInfo contains configuration settings necessary for the basic operation of any EdgeX service. diff --git a/go.mod b/go.mod index b49dc3c2..fe4ddf79 100644 --- a/go.mod +++ b/go.mod @@ -2,10 +2,10 @@ module github.com/edgexfoundry/go-mod-bootstrap/v2 require ( github.com/BurntSushi/toml v0.3.1 - github.com/edgexfoundry/go-mod-configuration v0.0.8 - github.com/edgexfoundry/go-mod-core-contracts v0.1.147 - github.com/edgexfoundry/go-mod-registry v0.1.27 - github.com/edgexfoundry/go-mod-secrets v0.0.32 + github.com/edgexfoundry/go-mod-configuration/v2 v2.0.0-dev.1 + github.com/edgexfoundry/go-mod-core-contracts/v2 v2.0.0-dev.1 + github.com/edgexfoundry/go-mod-registry/v2 v2.0.0-dev.1 + github.com/edgexfoundry/go-mod-secrets/v2 v2.0.0-dev.2 github.com/gorilla/mux v1.7.1 github.com/pelletier/go-toml v1.2.0 github.com/stretchr/testify v1.6.1