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

Golang flag_helpers.NewIntFlag函数代码示例

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

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



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

示例1: Metadata

func (cmd CreateQuota) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "create-quota",
		Description: cmd.T("Define a new resource quota"),
		Usage:       cmd.T("CF_NAME create-quota QUOTA [-m MEMORY] [-r ROUTES] [-s SERVICE_INSTANCES] [--allow-paid-service-plans]"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("m", cmd.T("Total amount of memory (e.g. 1024M, 1G, 10G)")),
			flag_helpers.NewIntFlag("r", cmd.T("Total number of routes")),
			flag_helpers.NewIntFlag("s", cmd.T("Total number of service instances")),
			cli.BoolFlag{Name: "allow-paid-service-plans", Usage: cmd.T("Can provision instances of paid service plans")},
		},
	}
}
开发者ID:palakmathur,项目名称:cli,代码行数:13,代码来源:create_quota.go


示例2: Metadata

func (cmd CreateSpaceQuota) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "create-space-quota",
		Description: T("Define a new space resource quota"),
		Usage:       T("CF_NAME create-space-quota QUOTA [-i INSTANCE_MEMORY] [-m MEMORY] [-r ROUTES] [-s SERVICE_INSTANCES] [--allow-paid-service-plans]"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("i", T("Maximum amount of memory an application instance can have(e.g. 1024M, 1G, 10G). -1 represents an unlimited amount.")),
			flag_helpers.NewStringFlag("m", T("Total amount of memory a space can have(e.g. 1024M, 1G, 10G)")),
			flag_helpers.NewIntFlag("r", T("Total number of routes")),
			flag_helpers.NewIntFlag("s", T("Total number of service instances")),
			cli.BoolFlag{Name: "allow-paid-service-plans", Usage: T("Can provision instances of paid service plans")},
		},
	}
}
开发者ID:matanzit,项目名称:cli,代码行数:14,代码来源:create_quota.go


示例3: Metadata

func (cmd *updateQuota) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "update-quota",
		Description: T("Update an existing resource quota"),
		Usage:       T("CF_NAME update-quota QUOTA [-m MEMORY] [-n NEW_NAME] [-r ROUTES] [-s SERVICE_INSTANCES] [--allow-paid-service-plans | --disallow-paid-service-plans]"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("m", T("Total amount of memory (e.g. 1024M, 1G, 10G)")),
			flag_helpers.NewStringFlag("n", T("New name")),
			flag_helpers.NewIntFlag("r", T("Total number of routes")),
			flag_helpers.NewIntFlag("s", T("Total number of service instances")),
			cli.BoolFlag{Name: "allow-paid-service-plans", Usage: T("Can provision instances of paid service plans")},
			cli.BoolFlag{Name: "disallow-paid-service-plans", Usage: T("Cannot provision instances of paid service plans")},
		},
	}
}
开发者ID:GABONIA,项目名称:cli,代码行数:15,代码来源:update_quota.go


示例4: Metadata

func (cmd *Push) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "push",
		ShortName:   "p",
		Description: T("Push a new app or sync changes to an existing app"),
		Usage: T("Push a single app (with or without a manifest):\n") + T("   CF_NAME push APP [-b BUILDPACK_NAME] [-c COMMAND] [-d DOMAIN] [-f MANIFEST_PATH]\n") + T("   [-i NUM_INSTANCES] [-k DISK] [-m MEMORY] [-n HOST] [-p PATH] [-s STACK] [-t TIMEOUT]\n") +
			"   [--no-hostname] [--no-manifest] [--no-route] [--no-start]\n" +
			"\n" + T("   Push multiple apps with a manifest:\n") + T("   CF_NAME push [-f MANIFEST_PATH]\n"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("b", T("Custom buildpack by name (e.g. my-buildpack) or GIT URL (e.g. https://github.com/heroku/heroku-buildpack-play.git)")),
			flag_helpers.NewStringFlag("c", T("Startup command, set to null to reset to default start command")),
			flag_helpers.NewStringFlag("d", T("Domain (e.g. example.com)")),
			flag_helpers.NewStringFlag("f", T("Path to manifest")),
			flag_helpers.NewIntFlag("i", T("Number of instances")),
			flag_helpers.NewStringFlag("k", T("Disk limit (e.g. 256M, 1024M, 1G)")),
			flag_helpers.NewStringFlag("m", T("Memory limit (e.g. 256M, 1024M, 1G)")),
			flag_helpers.NewStringFlag("n", T("Hostname (e.g. my-subdomain)")),
			flag_helpers.NewStringFlag("p", T("Path to app directory or file")),
			flag_helpers.NewStringFlag("s", T("Stack to use (a stack is a pre-built file system, including an operating system, that can run apps)")),
			flag_helpers.NewStringFlag("t", T("Start timeout in seconds")),
			cli.BoolFlag{Name: "no-hostname", Usage: T("Map the root domain to this app")},
			cli.BoolFlag{Name: "no-manifest", Usage: T("Ignore manifest file")},
			cli.BoolFlag{Name: "no-route", Usage: T("Do not map a route to this app")},
			cli.BoolFlag{Name: "no-start", Usage: T("Do not start an app after pushing")},
			cli.BoolFlag{Name: "random-route", Usage: T("Create a random route for this app")},
		},
	}
}
开发者ID:ramirito,项目名称:cli,代码行数:28,代码来源:push.go


示例5: Metadata

func (cmd *UpdateSpaceQuota) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "update-space-quota",
		Description: T("update an existing space quota"),
		Usage:       T("CF_NAME update-space-quota SPACE-QUOTA-NAME [-i MAX-INSTANCE-MEMORY] [-m MEMORY] [-n NEW_NAME] [-r ROUTES] [-s SERVICES] [--allow-paid-service-plans | --disallow-paid-service-plans]"),
		Flags: []cli.Flag{
			flag_helpers.NewStringFlag("i", T("Maximum amount of memory an application instance can have(e.g. 1024M, 1G, 10G). -1 represents an unlimited amount.")),
			flag_helpers.NewStringFlag("m", T("Total amount of memory a space can have(e.g. 1024M, 1G, 10G)")),
			flag_helpers.NewStringFlag("n", T("New name")),
			flag_helpers.NewIntFlag("r", T("Total number of routes")),
			flag_helpers.NewIntFlag("s", T("Total number of service instances")),
			cli.BoolFlag{Name: "allow-paid-service-plans", Usage: T("Can provision instances of paid service plans")},
			cli.BoolFlag{Name: "disallow-paid-service-plans", Usage: T("Can not provision instances of paid service plans")},
		},
	}
}
开发者ID:matanzit,项目名称:cli,代码行数:16,代码来源:update_space_quota.go


示例6: Metadata

func (cmd *Files) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "files",
		ShortName:   "f",
		Description: T("Print out a list of files in a directory or the contents of a specific file"),
		Usage:       T("CF_NAME files APP [-i INSTANCE] [PATH]"),
		Flags: []cli.Flag{
			flag_helpers.NewIntFlag("i", T("Instance")),
		},
	}
}
开发者ID:hail100,项目名称:cli,代码行数:11,代码来源:files.go


示例7: Metadata

func (cmd *Scale) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "scale",
		Description: "Change or view the instance count, disk space limit, and memory limit for an app",
		Usage:       "CF_NAME scale APP [-i INSTANCES] [-k DISK] [-m MEMORY] [-f]",
		Flags: []cli.Flag{
			flag_helpers.NewIntFlag("i", "Number of instances"),
			flag_helpers.NewStringFlag("k", "Disk limit (e.g. 256M, 1024M, 1G)"),
			flag_helpers.NewStringFlag("m", "Memory limit (e.g. 256M, 1024M, 1G)"),
			cli.BoolFlag{Name: "f", Usage: "Force restart of app without prompt"},
		},
	}
}
开发者ID:palakmathur,项目名称:cli,代码行数:13,代码来源:scale.go


示例8: Metadata

func (cmd *UpdateBuildpack) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "update-buildpack",
		Description: T("Update a buildpack"),
		Usage:       T("CF_NAME update-buildpack BUILDPACK [-p PATH] [-i POSITION] [--enable|--disable] [--lock|--unlock]"),
		Flags: []cli.Flag{
			flag_helpers.NewIntFlag("i", T("Buildpack position among other buildpacks")),
			flag_helpers.NewStringFlag("p", T("Path to directory or zip file")),
			cli.BoolFlag{Name: "enable", Usage: T("Enable the buildpack")},
			cli.BoolFlag{Name: "disable", Usage: T("Disable the buildpack")},
			cli.BoolFlag{Name: "lock", Usage: T("Lock the buildpack")},
			cli.BoolFlag{Name: "unlock", Usage: T("Unlock the buildpack")},
		},
	}
}
开发者ID:GABONIA,项目名称:cli,代码行数:15,代码来源:update_buildpack.go


示例9: Metadata

func (cmd *UpdateBuildpack) Metadata() command_metadata.CommandMetadata {
	return command_metadata.CommandMetadata{
		Name:        "update-buildpack",
		Description: T("Update a buildpack"),
		Usage: T("CF_NAME update-buildpack BUILDPACK [-p PATH] [-i POSITION] [--enable|--disable] [--lock|--unlock]") +
			T("\n\nTIP:\n") + T("   Path should be a zip file, a url to a zip file, or a local directory. Position is a positive integer, sets priority, and is sorted from lowest to highest."),
		Flags: []cli.Flag{
			flag_helpers.NewIntFlag("i", T("The order in which the buildpacks are checked during buildpack auto-detection")),
			flag_helpers.NewStringFlag("p", T("Path to directory or zip file")),
			cli.BoolFlag{Name: "enable", Usage: T("Enable the buildpack to be used for staging")},
			cli.BoolFlag{Name: "disable", Usage: T("Disable the buildpack from being used for staging")},
			cli.BoolFlag{Name: "lock", Usage: T("Lock the buildpack to prevent updates")},
			cli.BoolFlag{Name: "unlock", Usage: T("Unlock the buildpack to enable updates")},
		},
	}
}
开发者ID:tools-alexuser01,项目名称:cli,代码行数:16,代码来源:update_buildpack.go



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Golang flag_helpers.NewStringFlag函数代码示例发布时间:2022-05-23
下一篇:
Golang errors.NewWithFmt函数代码示例发布时间: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