当前位置: 首页>>代码示例>>Golang>>正文


Golang App.Version方法代码示例

本文整理汇总了Golang中github.com/codegangsta/cli.App.Version方法的典型用法代码示例。如果您正苦于以下问题:Golang App.Version方法的具体用法?Golang App.Version怎么用?Golang App.Version使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在github.com/codegangsta/cli.App的用法示例。


在下文中一共展示了App.Version方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: describeApp

func describeApp(app *cli.App, version string) {
	app.Name = "init-exporter"
	app.Usage = "exports services described by Procfile to systemd"
	app.Version = version

	app.Flags = []cli.Flag{
		cli.StringFlag{
			Name:  "n, appname",
			Usage: "Application name (This name only affects the names of generated files)",
		},
		cli.BoolFlag{
			Name:  "c, uninstall",
			Usage: "Remove scripts and helpers for a particular application",
		},
		cli.StringFlag{
			Name:  "config",
			Value: defaultConfigPath,
			Usage: "path to configuration file",
		},
		cli.StringFlag{
			Name:  "p, procfile",
			Usage: "path to procfile",
		},
		cli.StringFlag{
			Name:  "f, format",
			Usage: "Format of init files (upstart | systemd)",
		},
	}
}
开发者ID:miros,项目名称:init-exporter,代码行数:29,代码来源:init-exporter.go

示例2: setBasicInfos

func setBasicInfos(app *cli.App, appName string, version string) {
	app.Name = appName
	app.Version = version
	app.Usage = "Focus on your tasks and let your code flow."
	t := time.Now()
	app.Copyright = "TechMantra - " + strconv.Itoa(t.Year())
}
开发者ID:TechMantra,项目名称:focus,代码行数:7,代码来源:cli.go

示例3: main

func main() {
	var app *cli.App
	app = cli.NewApp()
	app.Name = APP_NAME
	app.Version = APP_VER
	app.Usage = "email for mail sending, or web or none for run web interface!"
	app.Commands = []cli.Command{
		task.CmdWeb,
		task.CmdEmail,
	}
	app.Flags = append(app.Flags, []cli.Flag{}...)

	app.Run(os.Args)
}
开发者ID:qSlide,项目名称:qslide,代码行数:14,代码来源:qs.go


注:本文中的github.com/codegangsta/cli.App.Version方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。