1
0
mirror of synced 2026-02-13 13:06:56 +00:00

Refactor all remaining create, delete, export, get command to use adapter

Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
Somtochi Onyekwere
2021-03-24 12:31:26 +01:00
parent c23e8c7ee1
commit 465eaa24d3
28 changed files with 513 additions and 1043 deletions

View File

@@ -20,7 +20,6 @@ import (
"bytes"
"context"
"fmt"
"github.com/spf13/cobra"
"k8s.io/apimachinery/pkg/types"
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -86,8 +85,7 @@ func (export exportCommand) run(cmd *cobra.Command, args []string) error {
}
if export.list.len() == 0 {
logger.Failuref("no objects found in %s namespace", rootArgs.namespace)
return nil
return fmt.Errorf("no objects found in %s namespace", rootArgs.namespace)
}
for i := 0; i < export.list.len(); i++ {