Cleanup pkg/config/config.go (#287)

Signed-off-by: yxxhero <aiopsclub@163.com>

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2022-08-14 12:17:02 +09:00
committed by GitHub
parent cf94a4edb3
commit 94b7a6c128
18 changed files with 19 additions and 310 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ func NewApplyCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "apply",
Short: "Apply all resources from state file only when there are changes",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(applyImpl.GlobalImpl)
err := config.NewCLIConfigImpl(applyImpl.GlobalImpl)
if err != nil {
return err
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewBuildCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "build",
Short: "Build all resources from state file only when there are changes",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(buildImpl.GlobalImpl)
err := config.NewCLIConfigImpl(buildImpl.GlobalImpl)
if err != nil {
return err
}
+2 -2
View File
@@ -11,7 +11,7 @@ func NewCacheInfoSubcommand(cacheImpl *config.CacheImpl) *cobra.Command {
Use: "info",
Short: "cache info",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(cacheImpl.GlobalImpl)
err := config.NewCLIConfigImpl(cacheImpl.GlobalImpl)
if err != nil {
return err
}
@@ -33,7 +33,7 @@ func NewCacheCleanupSubcommand(cacheImpl *config.CacheImpl) *cobra.Command {
Use: "cleanup",
Short: "clean up cache directory",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(cacheImpl.GlobalImpl)
err := config.NewCLIConfigImpl(cacheImpl.GlobalImpl)
if err != nil {
return err
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewChartsCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "charts",
Short: "DEPRECATED: sync releases from state file (helm upgrade --install)",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(chartsImpl.GlobalImpl)
err := config.NewCLIConfigImpl(chartsImpl.GlobalImpl)
if err != nil {
return err
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewDeleteCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "delete",
Short: "DEPRECATED: delete releases from state file (helm delete)",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(deleteImpl.GlobalImpl)
err := config.NewCLIConfigImpl(deleteImpl.GlobalImpl)
if err != nil {
return err
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewDepsCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "deps",
Short: "Update charts based on their requirements",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(depsImpl.GlobalImpl)
err := config.NewCLIConfigImpl(depsImpl.GlobalImpl)
if err != nil {
return err
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewDestroyCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "destroy",
Short: "Destroys and then purges releases",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(destroyImpl.GlobalImpl)
err := config.NewCLIConfigImpl(destroyImpl.GlobalImpl)
if err != nil {
return err
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewDiffCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "diff",
Short: "Diff releases defined in state file",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(diffImpl.GlobalImpl)
err := config.NewCLIConfigImpl(diffImpl.GlobalImpl)
if err != nil {
return err
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewFetchCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "fetch",
Short: "Fetch charts from state file",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(fetchImpl.GlobalImpl)
err := config.NewCLIConfigImpl(fetchImpl.GlobalImpl)
if err != nil {
return err
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewLintCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "lint",
Short: "Lint charts from state file (helm lint)",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(lintImpl.GlobalImpl)
err := config.NewCLIConfigImpl(lintImpl.GlobalImpl)
if err != nil {
return err
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewListCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "list",
Short: "List releases defined in state file",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(listImpl.GlobalImpl)
err := config.NewCLIConfigImpl(listImpl.GlobalImpl)
if err != nil {
return err
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewReposCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "repos",
Short: "Repos releases defined in state file",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(reposImpl.GlobalImpl)
err := config.NewCLIConfigImpl(reposImpl.GlobalImpl)
if err != nil {
return err
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewStatusCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "status",
Short: "Retrieve status of releases in state file",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(statusImpl.GlobalImpl)
err := config.NewCLIConfigImpl(statusImpl.GlobalImpl)
if err != nil {
return err
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewSyncCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "sync",
Short: "Sync releases defined in state file",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(syncImpl.GlobalImpl)
err := config.NewCLIConfigImpl(syncImpl.GlobalImpl)
if err != nil {
return err
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewTemplateCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "template",
Short: "Template releases defined in state file",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(templateImpl.GlobalImpl)
err := config.NewCLIConfigImpl(templateImpl.GlobalImpl)
if err != nil {
return err
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewTestCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "test",
Short: "Test charts from state file (helm test)",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(testImpl.GlobalImpl)
err := config.NewCLIConfigImpl(testImpl.GlobalImpl)
if err != nil {
return err
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewWriteValuesCmd(globalCfg *config.GlobalImpl) *cobra.Command {
Use: "write-values",
Short: "Write values files for releases. Similar to `helmfile template`, write values files instead of manifests.",
RunE: func(cmd *cobra.Command, args []string) error {
err := config.NewUrfaveCliConfigImplIns(writeValuesImpl.GlobalImpl)
err := config.NewCLIConfigImpl(writeValuesImpl.GlobalImpl)
if err != nil {
return err
}