示例#1
0
文件: main.go 项目: octoblu/go-go
	"fmt"
	"io/ioutil"
	"log"
	"os"
	"path/filepath"
	"strings"
	"text/template"

	"github.com/acsellers/inflections"
	"github.com/coreos/go-semver/semver"
	"github.com/fatih/color"
	"github.com/urfave/cli"
	De "github.com/visionmedia/go-debug"
)

var debug = De.Debug("governator:main")

type templateVars struct {
	ProjectName string
	PROJECTNAME string
}

func main() {
	app := cli.NewApp()
	app.Name = "go-go"
	app.Version = version()
	app.ArgsUsage = "<project-name>"
	app.Action = run
	app.Flags = []cli.Flag{}
	app.Run(os.Args)
}
示例#2
0
文件: main.go 项目: octoblu/go-go
import (
	"fmt"
	"log"
	"os"
	"os/signal"
	"syscall"
	"time"

	"github.com/coreos/go-semver/semver"
	"github.com/fatih/color"
	"github.com/urfave/cli"
	De "github.com/visionmedia/go-debug"
)

var debug = De.Debug("{{.ProjectName}}:main")

func main() {
	app := cli.NewApp()
	app.Name = "{{.ProjectName}}"
	app.Version = version()
	app.Action = run
	app.Flags = []cli.Flag{
		cli.StringFlag{
			Name:   "example, e",
			EnvVar: "{{.PROJECTNAME}}_EXAMPLE",
			Usage:  "Example string flag",
		},
	}
	app.Run(os.Args)
}