mirror of
https://github.com/kubescape/kubescape.git
synced 2026-04-15 06:58:11 +00:00
* bump version Signed-off-by: David Wertenteil <dwertent@armosec.io> * change default view Signed-off-by: David Wertenteil <dwertent@armosec.io> * fixed tests Signed-off-by: David Wertenteil <dwertent@armosec.io> * fixed go mod Signed-off-by: David Wertenteil <dwertent@armosec.io> --------- Signed-off-by: David Wertenteil <dwertent@armosec.io>
26 lines
588 B
Go
26 lines
588 B
Go
package config
|
|
|
|
import (
|
|
"os"
|
|
|
|
logger "github.com/kubescape/go-logger"
|
|
"github.com/kubescape/kubescape/v3/core/meta"
|
|
v1 "github.com/kubescape/kubescape/v3/core/meta/datastructures/v1"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func getViewCmd(ks meta.IKubescape) *cobra.Command {
|
|
|
|
// configCmd represents the config command
|
|
return &cobra.Command{
|
|
Use: "view",
|
|
Short: "View cached configurations",
|
|
Long: ``,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
if err := ks.ViewCachedConfig(&v1.ViewConfig{Writer: os.Stdout}); err != nil {
|
|
logger.L().Fatal(err.Error())
|
|
}
|
|
},
|
|
}
|
|
}
|