OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / spf13 / cobra / cobra / cmd / testdata / test.go.golden
1 // Copyright © 2017 NAME HERE <EMAIL ADDRESS>
2 //
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 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
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.
14
15 package cmd
16
17 import (
18         "fmt"
19
20         "github.com/spf13/cobra"
21 )
22
23 // testCmd represents the test command
24 var testCmd = &cobra.Command{
25         Use:   "test",
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:
29
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")
35         },
36 }
37
38 func init() {
39         RootCmd.AddCommand(testCmd)
40
41         // Here you will define your flags and configuration settings.
42
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")
46
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")
50 }