scriptparse

package
v0.0.0-...-e449b39 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Split2ListMap

func Split2ListMap(srcText string, sep1, sep2 string) ([]string, map[string]string, error)

Split2ListMap make list , map

func SplitCmdArgstr

func SplitCmdArgstr(cmdline string, sep string) (string, string)

SplitCmdArgstr split smd and argstr from cmdline

func SplitTrim

func SplitTrim(str string, sep string) []string

SplitTrim split string with trimspace

Types

type CmdArgs

type CmdArgs struct {
	Type2ConvFn map[string]func(valStr string, dstValue interface{}) error
	Cmd         string
	Name2Value  map[string]string
	NameList    []string
	Name2Type   map[string]string
}

func (*CmdArgs) GetArgs

func (ca *CmdArgs) GetArgs(varList ...interface{}) error

func (*CmdArgs) SetArgByName

func (ca *CmdArgs) SetArgByName(argName string, v interface{}) error

func (CmdArgs) String

func (ca CmdArgs) String() string

Jump to

Keyboard shortcuts

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