You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.6 KiB

  1. /*
  2. Copyright © 2021 Drew Short <warricks@sothr.com>
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. package cmd
  14. import (
  15. "fmt"
  16. "github.com/spf13/cobra"
  17. )
  18. // updateCmd represents the update command
  19. var updateCmd = &cobra.Command{
  20. Use: "update",
  21. Short: "Update pinned packages in a Dockerfile",
  22. Long: `A longer description that spans multiple lines and likely contains examples
  23. and usage of using your command. For example:
  24. TODO: Add longer description with examples
  25. Cobra is a CLI library for Go that empowers applications.
  26. This application is a tool to generate the needed files
  27. to quickly create a Cobra application.`,
  28. Run: func(cmd *cobra.Command, args []string) {
  29. fmt.Println("update called")
  30. },
  31. }
  32. func init() {
  33. rootCmd.AddCommand(updateCmd)
  34. // Here you will define your flags and configuration settings.
  35. // Cobra supports Persistent Flags which will work for this command
  36. // and all subcommands, e.g.:
  37. // updateCmd.PersistentFlags().String("foo", "", "A help for foo")
  38. // Cobra supports local flags which will only run when this command
  39. // is called directly, e.g.:
  40. // updateCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
  41. }