func RegisterCommand(name string, cmd Command) {
	commands[name] = cmd
	if fs := cmd.FlagSet(); fs != nil {
		fs.Init("", flag.ContinueOnError)
		fs.SetOutput(ioutil.Discard)
	}
}
RegisterCommand adds command to the global Commands map
package gowrap
import (
	"flag"
	"io"
	"io/ioutil"
	"text/template"
)
var version string = "dev"
type Command interface {
	FlagSet() *flag.FlagSet
	Run(args []string, stdout io.Writer) error
	ShortDescription() string
	UsageLine() string
	HelpMessage(w io.Writer) error
}
type BaseCommand struct {
	Flags *flag.FlagSet
	Short string
	Usage string
	Help  string
}
func (b BaseCommand) ShortDescription() string {
	return b.Short
}
func (b BaseCommand) UsageLine() string {
	return b.Usage
}
func (b BaseCommand) FlagSet() *flag.FlagSet {
	return b.Flags
}
func (b BaseCommand) HelpMessage(w io.Writer) error {
	_, err := w.Write([]byte(b.Help))
	return err
}
var commands = map[string]Command{}