1 // Copyright © 2017 NAME HERE <EMAIL ADDRESS>
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
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
20 "github.com/spf13/cobra"
23 // testCmd represents the test command
24 var testCmd = &cobra.Command{
26 Short: "A brief description of your command",
27 Long: `A longer description that spans multiple lines and likely contains examples
28 and usage of using your command. For example:
30 Cobra is a CLI library for Go that empowers applications.
31 This application is a tool to generate the needed files
32 to quickly create a Cobra application.`,
33 Run: func(cmd *cobra.Command, args []string) {
34 fmt.Println("test called")
39 RootCmd.AddCommand(testCmd)
41 // Here you will define your flags and configuration settings.
43 // Cobra supports Persistent Flags which will work for this command
44 // and all subcommands, e.g.:
45 // testCmd.PersistentFlags().String("foo", "", "A help for foo")
47 // Cobra supports local flags which will only run when this command
48 // is called directly, e.g.:
49 // testCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")