mirror of
https://github.com/kubescape/kubescape.git
synced 2026-02-14 18:09:55 +00:00
26 lines
581 B
Go
26 lines
581 B
Go
package config
|
|
|
|
import (
|
|
"os"
|
|
|
|
"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())
|
|
}
|
|
},
|
|
}
|
|
}
|