github.com/keysonZZZ/kmg@v0.0.0-20151121023212-05317bfd7d39/kmg/SubCommand/goCmd/AddCommandList.go (about)

     1  package goCmd
     2  
     3  import "github.com/bronze1man/kmg/kmgConsole"
     4  
     5  func AddCommandList() {
     6  	kmgConsole.AddAction(kmgConsole.Command{
     7  		Name:   "Go",
     8  		Desc:   "run go command in current project",
     9  		Runner: GoCommand,
    10  	})
    11  	kmgConsole.AddAction(kmgConsole.Command{
    12  		Name:   "GoCrossCompile",
    13  		Desc:   "cross compile target in current project",
    14  		Runner: runGoCrossCompile,
    15  	})
    16  	kmgConsole.AddAction(kmgConsole.Command{
    17  		Name:   "GoCrossCompileInit",
    18  		Desc:   "cross compile init target in current project",
    19  		Runner: runGoCrossCompileInit,
    20  	})
    21  	kmgConsole.AddAction(kmgConsole.Command{
    22  		Name:   "GoRun",
    23  		Desc:   "run go run in current project and use go install to speed up build",
    24  		Runner: GoRunCmd,
    25  	})
    26  	kmgConsole.AddAction(kmgConsole.Command{
    27  		Name:   "GoTest",
    28  		Desc:   "递归目录的go test",
    29  		Runner: runGoTest,
    30  	})
    31  	kmgConsole.AddAction(kmgConsole.Command{
    32  		Name:   "GoFmt",
    33  		Runner: runGoFmt,
    34  	})
    35  	kmgConsole.AddCommandWithName("GoEnv", GoEnvCmd)
    36  }