當前位置: 首頁>>代碼示例>>Golang>>正文


Golang gnuflag.Var函數代碼示例

本文整理匯總了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;未經允許,請勿轉載。