本文整理汇总了Golang中github.com/vmware/govmomi/govc/flags.NewOutputFlag函数的典型用法代码示例。如果您正苦于以下问题:Golang NewOutputFlag函数的具体用法?Golang NewOutputFlag怎么用?Golang NewOutputFlag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了NewOutputFlag函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: 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")
f.BoolVar(&cmd.all, "a", false, "Wait for an IP address on all NICs")
f.BoolVar(&cmd.v4, "v4", false, "Only report IPv4 addresses")
}
开发者ID:hmahmood,项目名称:govmomi,代码行数:11,代码来源:ip.go
示例17: 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")
f.BoolVar(&cmd.slash, "p", false, "Write a slash (`/') after each filename if that file is a directory")
f.BoolVar(&cmd.all, "a", false, "Include entries whose names begin with a dot (.)")
}
开发者ID:fdawg4l,项目名称:govmomi,代码行数:11,代码来源:ls.go
示例18: Register
func (cmd *vmdk) Register(ctx context.Context, f *flag.FlagSet) {
cmd.DatastoreFlag, ctx = flags.NewDatastoreFlag(ctx)
cmd.DatastoreFlag.Register(ctx, f)
cmd.ResourcePoolFlag, ctx = flags.NewResourcePoolFlag(ctx)
cmd.ResourcePoolFlag.Register(ctx, f)
cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
cmd.OutputFlag.Register(ctx, f)
f.BoolVar(&cmd.upload, "upload", true, "Upload specified disk")
f.BoolVar(&cmd.force, "force", false, "Overwrite existing disk")
f.BoolVar(&cmd.keep, "keep", false, "Keep uploaded disk after import")
}
开发者ID:fdawg4l,项目名称:govmomi,代码行数:12,代码来源:vmdk.go
示例19: Register
func (cmd *ps) Register(ctx context.Context, f *flag.FlagSet) {
cmd.OutputFlag, ctx = flags.NewOutputFlag(ctx)
cmd.OutputFlag.Register(ctx, f)
cmd.GuestFlag, ctx = newGuestFlag(ctx)
cmd.GuestFlag.Register(ctx, f)
cmd.uids = make(map[string]bool)
f.BoolVar(&cmd.every, "e", false, "Select all processes")
f.BoolVar(&cmd.wait, "X", false, "Wait for process to exit")
f.Var(&cmd.pids, "p", "Select by process ID")
f.Var(&cmd.uids, "U", "Select by process UID")
}
开发者ID:vmware,项目名称:vic,代码行数:13,代码来源:ps.go
示例20: 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)
err := cmd.typ.Set("lun")
if err != nil {
panic(err)
}
f.Var(&cmd.typ, "t", fmt.Sprintf("Type (%s)", strings.Join(infoTypes, ",")))
}
开发者ID:robvanmieghem,项目名称:machine,代码行数:13,代码来源:info.go
注:本文中的github.com/vmware/govmomi/govc/flags.NewOutputFlag函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论