Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InstallCmd = &cobra.Command{ Use: "install", PersistentPreRun: func(cmd *cobra.Command, args []string) { currentUser, err := user.Current() if err != nil { fmt.Println("Something went wrong, please report this to the issues page on GitHub.") } if currentUser.Username != "root" { fmt.Println("error: you cannot perform this operation unless you are root.") os.Exit(1) } }, Args: cobra.MinimumNArgs(1), }
View Source
var UninstallCmd = &cobra.Command{ Use: "uninstall", PersistentPreRun: func(cmd *cobra.Command, args []string) { currentUser, err := user.Current() if err != nil { fmt.Println("Something went wrong, please report this.") } if currentUser.Username != "root" { fmt.Println("Please run this command as root.") os.Exit(3) } }, Args: cobra.MinimumNArgs(1), Run: func(cmd *cobra.Command, args []string) { fmt.Printf("Please supply a program to uninstall \n") }, }
View Source
var UpdateCmd = &cobra.Command{ Use: "update", PersistentPreRun: func(cmd *cobra.Command, args []string) { currentUser, err := user.Current() if err != nil { fmt.Println("Something went wrong, please report this to the issues page on GitHub.") } if currentUser.Username != "root" { fmt.Println("Please run this command as root.") os.Exit(1) } }, Args: cobra.MinimumNArgs(1), }
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.