update.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. Copyright © 2024 NAME HERE <EMAIL ADDRESS>
  3. */
  4. package cmd
  5. import (
  6. "fmt"
  7. "github.com/spf13/cobra"
  8. )
  9. // updateCmd represents the update command
  10. var updateCmd = &cobra.Command{
  11. Use: "update",
  12. Short: "A brief description of your command",
  13. Long: `A longer description that spans multiple lines and likely contains examples
  14. and usage of using your command. For example:
  15. Cobra is a CLI library for Go that empowers applications.
  16. This application is a tool to generate the needed files
  17. to quickly create a Cobra application.`,
  18. Run: func(cmd *cobra.Command, args []string) {
  19. fmt.Println("update called")
  20. },
  21. }
  22. func init() {
  23. rootCmd.AddCommand(updateCmd)
  24. // Here you will define your flags and configuration settings.
  25. // Cobra supports Persistent Flags which will work for this command
  26. // and all subcommands, e.g.:
  27. // updateCmd.PersistentFlags().String("foo", "", "A help for foo")
  28. // Cobra supports local flags which will only run when this command
  29. // is called directly, e.g.:
  30. // updateCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
  31. }