@@ -19,7 +19,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
19
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
20
THE SOFTWARE.
21
21
*/
22
- package cmd
22
+ package sandbox
23
23
24
24
import (
25
25
"fmt"
@@ -30,28 +30,13 @@ import (
30
30
// sandboxCmd represents the sandbox command
31
31
var sandboxCmd = & cobra.Command {
32
32
Use : "sandbox" ,
33
- Short : "A brief description of your command" ,
34
- Long : `A longer description that spans multiple lines and likely contains examples
35
- and usage of using your command. For example:
36
-
37
- Cobra is a CLI library for Go that empowers applications.
38
- This application is a tool to generate the needed files
39
- to quickly create a Cobra application.` ,
33
+ Short : "SandBox command" ,
34
+ Long : `This is a sandbox command.` ,
40
35
Run : func (cmd * cobra.Command , args []string ) {
41
36
fmt .Println ("sandbox called" )
42
37
},
43
38
}
44
39
45
- func init () {
46
- rootCmd .AddCommand (sandboxCmd )
47
-
48
- // Here you will define your flags and configuration settings.
49
-
50
- // Cobra supports Persistent Flags which will work for this command
51
- // and all subcommands, e.g.:
52
- // sandboxCmd.PersistentFlags().String("foo", "", "A help for foo")
53
-
54
- // Cobra supports local flags which will only run when this command
55
- // is called directly, e.g.:
56
- // sandboxCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
40
+ func GetCommand () * cobra.Command {
41
+ return sandboxCmd
57
42
}
0 commit comments