From caa97158d04829664486177ec428f62a33f414b9 Mon Sep 17 00:00:00 2001 From: Josh Dolitsky Date: Mon, 30 Aug 2021 15:54:42 -0400 Subject: [PATCH] Revert moving registry actions back to pkg/ Signed-off-by: Josh Dolitsky --- cmd/helm/registry_login.go | 3 ++- cmd/helm/registry_logout.go | 3 ++- .../experimental}/action/registry_login.go | 5 +++-- .../experimental}/action/registry_logout.go | 10 +++++++--- 4 files changed, 14 insertions(+), 7 deletions(-) rename {pkg => internal/experimental}/action/registry_login.go (90%) rename {pkg => internal/experimental}/action/registry_logout.go (87%) diff --git a/cmd/helm/registry_login.go b/cmd/helm/registry_login.go index a138bfc2d..08c2daa3b 100644 --- a/cmd/helm/registry_login.go +++ b/cmd/helm/registry_login.go @@ -29,6 +29,7 @@ import ( "github.com/spf13/cobra" "helm.sh/helm/v3/cmd/helm/require" + experimental "helm.sh/helm/v3/internal/experimental/action" "helm.sh/helm/v3/pkg/action" ) @@ -54,7 +55,7 @@ func newRegistryLoginCmd(cfg *action.Configuration, out io.Writer) *cobra.Comman return err } - return action.NewRegistryLogin(cfg).Run(out, hostname, username, password, insecureOpt) + return experimental.NewRegistryLogin(cfg).Run(out, hostname, username, password, insecureOpt) }, } diff --git a/cmd/helm/registry_logout.go b/cmd/helm/registry_logout.go index e7e1a24fe..abeb90461 100644 --- a/cmd/helm/registry_logout.go +++ b/cmd/helm/registry_logout.go @@ -22,6 +22,7 @@ import ( "github.com/spf13/cobra" "helm.sh/helm/v3/cmd/helm/require" + experimental "helm.sh/helm/v3/internal/experimental/action" "helm.sh/helm/v3/pkg/action" ) @@ -38,7 +39,7 @@ func newRegistryLogoutCmd(cfg *action.Configuration, out io.Writer) *cobra.Comma Hidden: !FeatureGateOCI.IsEnabled(), RunE: func(cmd *cobra.Command, args []string) error { hostname := args[0] - return action.NewRegistryLogout(cfg).Run(out, hostname) + return experimental.NewRegistryLogout(cfg).Run(out, hostname) }, } } diff --git a/pkg/action/registry_login.go b/internal/experimental/action/registry_login.go similarity index 90% rename from pkg/action/registry_login.go rename to internal/experimental/action/registry_login.go index d474885b6..8312f3c57 100644 --- a/pkg/action/registry_login.go +++ b/internal/experimental/action/registry_login.go @@ -20,15 +20,16 @@ import ( "io" "helm.sh/helm/v3/internal/experimental/registry" + "helm.sh/helm/v3/pkg/action" ) // RegistryLogin performs a registry login operation. type RegistryLogin struct { - cfg *Configuration + cfg *action.Configuration } // NewRegistryLogin creates a new RegistryLogin object with the given configuration. -func NewRegistryLogin(cfg *Configuration) *RegistryLogin { +func NewRegistryLogin(cfg *action.Configuration) *RegistryLogin { return &RegistryLogin{ cfg: cfg, } diff --git a/pkg/action/registry_logout.go b/internal/experimental/action/registry_logout.go similarity index 87% rename from pkg/action/registry_logout.go rename to internal/experimental/action/registry_logout.go index 57acdc57e..039515c7e 100644 --- a/pkg/action/registry_logout.go +++ b/internal/experimental/action/registry_logout.go @@ -16,15 +16,19 @@ limitations under the License. package action -import "io" +import ( + "io" + + "helm.sh/helm/v3/pkg/action" +) // RegistryLogout performs a registry login operation. type RegistryLogout struct { - cfg *Configuration + cfg *action.Configuration } // NewRegistryLogout creates a new RegistryLogout object with the given configuration. -func NewRegistryLogout(cfg *Configuration) *RegistryLogout { +func NewRegistryLogout(cfg *action.Configuration) *RegistryLogout { return &RegistryLogout{ cfg: cfg, }