plag

package module
v0.0.0-...-6d9360b Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README

plag

golang对string进行类flag解析,用于聊天机器人等场景命令交互

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Int

func Int(short, long, help string, dValue int) *pInt

Types

type Cmd

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

func NewCmd

func NewCmd(name, help string) *Cmd

func (*Cmd) Clean

func (c *Cmd) Clean() *Cmd

func (*Cmd) Exist

func (c *Cmd) Exist(arg interface{}) bool

func (*Cmd) Get

func (c *Cmd) Get(arg interface{}) (bool, interface{})

func (*Cmd) Help

func (c *Cmd) Help() string

func (*Cmd) Parse

func (c *Cmd) Parse(cmdLine string) (isHelp bool, help string, err error)

func (*Cmd) Set

func (c *Cmd) Set(args ...interface{})

func (*Cmd) SetSplitFlag

func (c *Cmd) SetSplitFlag(flag string)

Jump to

Keyboard shortcuts

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