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.

52 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. // serveCmd represents the serve command
  19. var serveCmd = &cobra.Command{
  20. Use: "serve",
  21. Short: "A brief description of your command",
  22. Long: `A longer description that spans multiple lines and likely contains examples
  23. and usage of using your command. For example:
  24. Cobra is a CLI library for Go that empowers applications.
  25. This application is a tool to generate the needed files
  26. to quickly create a Cobra application.`,
  27. Run: func(cmd *cobra.Command, args []string) {
  28. fmt.Println("serve called")
  29. },
  30. }
  31. func init() {
  32. rootCmd.AddCommand(serveCmd)
  33. // Here you will define your flags and configuration settings.
  34. // Cobra supports Persistent Flags which will work for this command
  35. // and all subcommands, e.g.:
  36. // serveCmd.PersistentFlags().String("foo", "", "A help for foo")
  37. // Cobra supports local flags which will only run when this command
  38. // is called directly, e.g.:
  39. // serveCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
  40. }