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


Golang flags.NewOutputFlag函數代碼示例

本文整理匯總了Golang中github.com/vmware/govmomi/govc/flags.NewOutputFlag函數的典型用法代碼示例。如果您正苦於以下問題:Golang NewOutputFlag函數的具體用法?Golang NewOutputFlag怎麽用?Golang NewOutputFlag使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了NewOutputFlag函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: Register

func (cmd *upload) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
	cmd.OutputFlag.Register(ctx, f)

	cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx)
	cmd.DatastoreFlag.Register(ctx, f)
}
開發者ID:vmware,項目名稱:vic,代碼行數:7,代碼來源:upload.go

示例2: Register

func (cmd *remove) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.ClientFlag, ctx = flags.NewClientFlag(ctx)
	cmd.ClientFlag.Register(ctx, f)

	cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
	cmd.OutputFlag.Register(ctx, f)
}
開發者ID:robvanmieghem,項目名稱:machine,代碼行數:7,代碼來源:remove.go

示例3: Register

func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx)
	cmd.DatacenterFlag.Register(ctx, f)

	cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
	cmd.OutputFlag.Register(ctx, f)
}
開發者ID:vmware,項目名稱:vic,代碼行數:7,代碼來源:ls.go

示例4: Register

func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.HostSystemFlag, ctx = flags.NewHostSystemFlag(ctx)
	cmd.HostSystemFlag.Register(ctx, f)

	cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
	cmd.OutputFlag.Register(ctx, f)
}
開發者ID:vmware,項目名稱:vic,代碼行數:7,代碼來源:info.go

示例5: NewPermissionFlag

func NewPermissionFlag(ctx context.Context) (*PermissionFlag, context.Context) {
	f := &PermissionFlag{}
	f.List.f = f
	f.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx)
	f.OutputFlag, ctx = flags.NewOutputFlag(ctx)
	return f, ctx
}
開發者ID:tjyang,項目名稱:govmomi,代碼行數:7,代碼來源:permissions.go

示例6: Register

func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.VirtualMachineFlag, ctx = flags.NewVirtualMachineFlag(ctx)
	cmd.VirtualMachineFlag.Register(ctx, f)

	cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
	cmd.OutputFlag.Register(ctx, f)
}
開發者ID:robvanmieghem,項目名稱:machine,代碼行數:7,代碼來源:info.go

示例7: Register

func (cmd *ls) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx)
	cmd.DatastoreFlag.Register(ctx, f)

	cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
	cmd.OutputFlag.Register(ctx, f)

	f.BoolVar(&cmd.long, "l", false, "Long listing format")
}
開發者ID:excilsploft,項目名稱:govmomi,代碼行數:9,代碼來源:ls.go

示例8: Register

func (cmd *env) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
	cmd.OutputFlag.Register(ctx, f)

	cmd.ClientFlag, ctx = flags.NewClientFlag(ctx)
	cmd.ClientFlag.Register(ctx, f)

	f.BoolVar(&cmd.extra, "x", false, "Output variables for each GOVC_URL component")
}
開發者ID:frapposelli,項目名稱:govmomi,代碼行數:9,代碼來源:command.go

示例9: Register

func (cmd *assigned) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.ClientFlag, ctx = flags.NewClientFlag(ctx)
	cmd.ClientFlag.Register(ctx, f)

	cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
	cmd.OutputFlag.Register(ctx, f)

	f.StringVar(&cmd.id, "id", "", "Entity ID")
}
開發者ID:frapposelli,項目名稱:govmomi,代碼行數:9,代碼來源:assigned.go

示例10: Register

func (cmd *list) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.ClientFlag, ctx = flags.NewClientFlag(ctx)
	cmd.ClientFlag.Register(ctx, f)

	cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
	cmd.OutputFlag.Register(ctx, f)

	f.StringVar(&cmd.feature, "feature", "", featureUsage)
}
開發者ID:frapposelli,項目名稱:govmomi,代碼行數:9,代碼來源:list.go

示例11: Register

func (cmd *info) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.DatacenterFlag, ctx = flags.NewDatacenterFlag(ctx)
	cmd.DatacenterFlag.Register(ctx, f)
	cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
	cmd.OutputFlag.Register(ctx, f)

	f.BoolVar(&cmd.pools, "p", true, "List resource pools")
	f.BoolVar(&cmd.apps, "a", false, "List virtual app resource pools")
}
開發者ID:fdawg4l,項目名稱:govmomi,代碼行數:9,代碼來源:info.go

示例12: Register

func (cmd *ip) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
	cmd.OutputFlag.Register(ctx, f)

	cmd.SearchFlag, ctx = flags.NewSearchFlag(ctx, flags.SearchVirtualMachines)
	cmd.SearchFlag.Register(ctx, f)

	f.BoolVar(&cmd.esx, "esxcli", false, "Use esxcli instead of guest tools")
}
開發者ID:robvanmieghem,項目名稱:machine,代碼行數:9,代碼來源:ip.go

示例13: Register

func (cmd *cp) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
	cmd.OutputFlag.Register(ctx, f)

	cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx)
	cmd.DatastoreFlag.Register(ctx, f)

	f.BoolVar(&cmd.force, "f", false, "If true, overwrite any identically named file at the destination")
}
開發者ID:robvanmieghem,項目名稱:machine,代碼行數:9,代碼來源:cp.go

示例14: Register

func (cmd *about) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.ClientFlag, ctx = flags.NewClientFlag(ctx)
	cmd.ClientFlag.Register(ctx, f)

	cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
	cmd.OutputFlag.Register(ctx, f)

	f.BoolVar(&cmd.Long, "l", false, "Include service content")
}
開發者ID:vmware,項目名稱:vic,代碼行數:9,代碼來源:command.go

示例15: Register

func (cmd *cert) Register(ctx context.Context, f *flag.FlagSet) {
	cmd.ClientFlag, ctx = flags.NewClientFlag(ctx)
	cmd.ClientFlag.Register(ctx, f)

	cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
	cmd.OutputFlag.Register(ctx, f)

	f.BoolVar(&cmd.show, "show", false, "Show PEM encoded server certificate only")
	f.BoolVar(&cmd.thumbprint, "thumbprint", false, "Output host hash and thumbprint only")
}
開發者ID:frapposelli,項目名稱:govmomi,代碼行數:10,代碼來源:cert.go


注:本文中的github.com/vmware/govmomi/govc/flags.NewOutputFlag函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。