Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "cuni", Short: "Central University CLI Tool", Long: `cuni is a command-line tool for interacting with Central University services. It provides access to courses, authentication, and data synchronization.`, SilenceUsage: true, SilenceErrors: true, PersistentPreRun: func(cmd *cobra.Command, _ []string) { cmdStartTime = time.Now() cmdPath = cmd.CommandPath() cmd.Flags().Visit(func(f *pflag.Flag) { cmdFlags = append(cmdFlags, f.Name) }) }, PersistentPostRun: func(_ *cobra.Command, _ []string) { telemetry.Default().CommandExecuted(telemetry.CommandEvent{ Command: cmdPath, Flags: cmdFlags, Duration: time.Since(cmdStartTime), Success: true, }) update.CheckForUpdate() telemetry.Default().Flush(telemetry.DefaultFlushTimeout) }, }
Functions ¶
func ReportUsageError ¶ added in v0.1.5
func ReportUsageError()
ReportUsageError records a command that never reached PersistentPreRun — unknown command, bad flags. Called from main on RootCmd.Execute error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.