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

     1  package command
     2  
     3  import (
     4  	"fmt"
     5  	"github.com/bronze1man/kmg/kmgConsole"
     6  	"runtime"
     7  )
     8  
     9  func init() {
    10  	kmgConsole.AddAction(kmgConsole.Command{
    11  		Name:   "CurrentPlatform",
    12  		Desc:   "get current platform(from this binary)",
    13  		Runner: runCurrentPlatform,
    14  	})
    15  }
    16  
    17  func runCurrentPlatform() {
    18  	fmt.Println(runtime.GOOS + "_" + runtime.GOARCH)
    19  }