args

package
v0.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *creator

New 创建新的参数

Types

type Args

type Args struct {
	// contains filtered or unexported fields
}

Args 参数列表

func (*Args) Cli

func (a *Args) Cli() string

func (*Args) String

func (a *Args) String() (args []string)

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder 参数列表构建器

func (*Builder) Add

func (b *Builder) Add(args ...any) *Builder

func (*Builder) Arg

func (b *Builder) Arg(key string, value any) *Builder

func (*Builder) Build

func (b *Builder) Build() *Args

func (*Builder) Clone added in v0.3.5

func (b *Builder) Clone() (builder *Builder)

func (*Builder) Flag

func (b *Builder) Flag(flags ...string) *Builder

func (*Builder) Insert

func (b *Builder) Insert(args ...any) *Builder

func (*Builder) Option added in v0.3.4

func (b *Builder) Option(key string, value any, others ...any) *Builder

func (*Builder) Subcommand

func (b *Builder) Subcommand(command string, others ...string) *Builder

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL