Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "kubeaid-core", PersistentPreRun: func(cmd *cobra.Command, args []string) { err := os.MkdirAll(constants.OutputLogsDirectory, 0o750) assert.AssertErrNil(cmd.Context(), err, "Failed ensuring that logs directory exists") logFilePath := filepath.Join( constants.OutputLogsDirectory, time.Now().UTC().Format(time.RFC3339)+".log", ) logFile, err := os.OpenFile(logFilePath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0o644, ) if err != nil { log.Fatalf("Failed opening log file : %v", err) } logger.CreateLogger(globals.IsDebugModeEnabled, []io.Writer{logFile, os.Stdout}) }, RunE: func(cmd *cobra.Command, args []string) error { return cmd.Help() }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.