linsk/cmd/root.go

30 lines
399 B
Go
Raw Normal View History

2023-08-25 15:12:19 +01:00
package cmd
import (
"os"
2023-08-25 16:54:58 +01:00
"log/slog"
2023-08-25 15:12:19 +01:00
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "vldisk",
// TODO: Fill this
// Short: "",
// Long: ``,
}
func Execute() {
err := rootCmd.Execute()
if err != nil {
os.Exit(1)
}
}
func init() {
2023-08-25 16:54:58 +01:00
slog.SetDefault(slog.New(slog.NewTextHandler(os.Stderr, nil)))
2023-08-25 15:12:19 +01:00
rootCmd.AddCommand(lsCmd)
2023-08-25 16:54:58 +01:00
rootCmd.AddCommand(runCmd)
2023-08-25 15:12:19 +01:00
}