Beispiel #1
0
	"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)
}
Beispiel #2
0
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)
}