• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Golang gnuflag.Var函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Golang中github.com/lxc/lxd/shared/gnuflag.Var函数的典型用法代码示例。如果您正苦于以下问题:Golang Var函数的具体用法?Golang Var怎么用?Golang Var使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: flags

func (c *launchCmd) flags() {
	massage_args()
	gnuflag.Var(&profArgs, "profile", "Profile to apply to the new container")
	gnuflag.Var(&profArgs, "p", "Profile to apply to the new container")
	gnuflag.BoolVar(&ephem, "ephemeral", false, gettext.Gettext("Ephemeral container"))
	gnuflag.BoolVar(&ephem, "e", false, gettext.Gettext("Ephemeral container"))
}
开发者ID:jumpstarter-io,项目名称:lxd,代码行数:7,代码来源:launch.go


示例2: flags

func (c *copyCmd) flags() {
	gnuflag.Var(&c.confArgs, "config", i18n.G("Config key/value to apply to the new container"))
	gnuflag.Var(&c.confArgs, "c", i18n.G("Config key/value to apply to the new container"))
	gnuflag.Var(&c.profArgs, "profile", i18n.G("Profile to apply to the new container"))
	gnuflag.Var(&c.profArgs, "p", i18n.G("Profile to apply to the new container"))
	gnuflag.BoolVar(&c.ephem, "ephemeral", false, i18n.G("Ephemeral container"))
	gnuflag.BoolVar(&c.ephem, "e", false, i18n.G("Ephemeral container"))
}
开发者ID:vahe,项目名称:lxd,代码行数:8,代码来源:copy.go


示例3: flags

func (c *launchCmd) flags() {
	massage_args()
	gnuflag.Var(&confArgs, "config", i18n.G("Config key/value to apply to the new container"))
	gnuflag.Var(&confArgs, "c", i18n.G("Config key/value to apply to the new container"))
	gnuflag.Var(&profArgs, "profile", i18n.G("Profile to apply to the new container"))
	gnuflag.Var(&profArgs, "p", i18n.G("Profile to apply to the new container"))
	gnuflag.BoolVar(&ephem, "ephemeral", false, i18n.G("Ephemeral container"))
	gnuflag.BoolVar(&ephem, "e", false, i18n.G("Ephemeral container"))
}
开发者ID:mickydelfavero,项目名称:lxd,代码行数:9,代码来源:launch.go


示例4: flags

func (c *initCmd) flags() {
	c.massage_args()
	gnuflag.Var(&c.confArgs, "config", i18n.G("Config key/value to apply to the new container"))
	gnuflag.Var(&c.confArgs, "c", i18n.G("Config key/value to apply to the new container"))
	gnuflag.Var(&c.profArgs, "profile", i18n.G("Profile to apply to the new container"))
	gnuflag.Var(&c.profArgs, "p", i18n.G("Profile to apply to the new container"))
	gnuflag.BoolVar(&c.ephem, "ephemeral", false, i18n.G("Ephemeral container"))
	gnuflag.BoolVar(&c.ephem, "e", false, i18n.G("Ephemeral container"))
	gnuflag.StringVar(&c.network, "network", "", i18n.G("Network name"))
	gnuflag.StringVar(&c.network, "n", "", i18n.G("Network name"))
}
开发者ID:vahe,项目名称:lxd,代码行数:11,代码来源:init.go


示例5: flags

func (c *imageCmd) flags() {
	gnuflag.BoolVar(&c.publicImage, "public", false, i18n.G("Make image public"))
	gnuflag.BoolVar(&c.copyAliases, "copy-aliases", false, i18n.G("Copy aliases from source"))
	gnuflag.BoolVar(&c.autoUpdate, "auto-update", false, i18n.G("Keep the image up to date after initial copy"))
	gnuflag.Var(&c.addAliases, "alias", i18n.G("New alias to define at target"))
	gnuflag.StringVar(&c.format, "format", "table", i18n.G("Format"))
}
开发者ID:vahe,项目名称:lxd,代码行数:7,代码来源:image.go


示例6: flags

func (c *publishCmd) flags() {
	gnuflag.BoolVar(&c.makePublic, "public", false, i18n.G("Make the image public"))
	gnuflag.Var(&c.pAliases, "alias", i18n.G("New alias to define at target"))
	gnuflag.BoolVar(&c.Force, "force", false, i18n.G("Stop the container if currently running"))
	gnuflag.BoolVar(&c.Force, "f", false, i18n.G("Stop the container if currently running"))
	gnuflag.StringVar(&c.compression_algorithm, "compression", "", i18n.G("Define a compression algorithm: for image or none"))
}
开发者ID:vahe,项目名称:lxd,代码行数:7,代码来源:publish.go


示例7: flags

func (c *execCmd) flags() {
	gnuflag.Var(&envArgs, "env", gettext.Gettext("An environment variable of the form HOME=/home/foo"))
}
开发者ID:rockstar,项目名称:lxd,代码行数:3,代码来源:exec.go


示例8: flags

func (c *publishCmd) flags() {
	gnuflag.BoolVar(&makePublic, "public", false, gettext.Gettext("Make the image public"))
	gnuflag.Var(&pAliases, "alias", gettext.Gettext("New alias to define at target"))
}
开发者ID:argami,项目名称:goard,代码行数:4,代码来源:publish.go


示例9: flags

func (c *imageCmd) flags() {
	gnuflag.BoolVar(&publicImage, "public", false, gettext.Gettext("Make image public"))
	gnuflag.BoolVar(&copyAliases, "copy-aliases", false, gettext.Gettext("Copy aliases from source"))
	gnuflag.Var(&addAliases, "alias", gettext.Gettext("New alias to define at target"))
}
开发者ID:achanda,项目名称:lxd,代码行数:5,代码来源:image.go


示例10: flags

func (c *execCmd) flags() {
	gnuflag.Var(&c.envArgs, "env", i18n.G("An environment variable of the form HOME=/home/foo"))
	gnuflag.StringVar(&c.modeFlag, "mode", "auto", i18n.G("Override the terminal mode (auto, interactive or non-interactive)"))
}
开发者ID:jameinel,项目名称:lxd,代码行数:4,代码来源:exec.go


示例11: flags

func (c *monitorCmd) flags() {
	gnuflag.Var(&typeArgs, "type", gettext.Gettext("Event type to listen for"))
}
开发者ID:ralic,项目名称:lxd,代码行数:3,代码来源:monitor.go


示例12: flags

func (c *monitorCmd) flags() {
	gnuflag.Var(&typeArgs, "type", i18n.G("Event type to listen for"))
}
开发者ID:Lee-Kevin,项目名称:lxd,代码行数:3,代码来源:monitor.go


示例13: flags

func (c *publishCmd) flags() {
	gnuflag.BoolVar(&c.makePublic, "public", false, i18n.G("Make the image public"))
	gnuflag.Var(&c.pAliases, "alias", i18n.G("New alias to define at target"))
	gnuflag.BoolVar(&c.Force, "force", false, i18n.G("Stop the container if currently running"))
	gnuflag.BoolVar(&c.Force, "f", false, i18n.G("Stop the container if currently running"))
}
开发者ID:jameinel,项目名称:lxd,代码行数:6,代码来源:publish.go



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Golang i18n.G函数代码示例发布时间:2022-05-23
下一篇:
Golang gnuflag.StringVar函数代码示例发布时间:2022-05-23
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap