Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ArgSplit string = ":"
Functions ¶
This section is empty.
Types ¶
type ArgMatcher ¶
type ArgMatcher interface { // 是否匹配当前参数 Match(st KeyStructer, k ArgIndex, arg string) (KeyArg, error) }
type GoTypeMatch ¶
type GoTypeMatch struct{}
GoTypeMatch go类型参数匹配
func (GoTypeMatch) Match ¶
func (x GoTypeMatch) Match(st KeyStructer, k ArgIndex, arg string) (_ KeyArg, err error)
type KeyArg ¶
type KeyArg interface { // 需要导入的包 Imports() []string // 是否是构造参数 ConstructArg() bool // 参数类型 ArgType() (arg string) // ArgName() string // 格式化代码 FormatCode(obj string) (code string) }
func MatchGoTypes ¶
func MatchGoTypes(argv string, st KeyStructer) (args []KeyArg, err error)
func MergeSourceArg ¶
MergeSourceArg 合并source,减少write次数
type KeyStructer ¶
type SourceArg ¶
type SourceArg struct { EmptyArg // contains filtered or unexported fields }
SourceArg 原始字符串参数
type SourceMatch ¶
type SourceMatch struct{}
SourceMatch 原始字符串匹配
func (SourceMatch) Match ¶
func (SourceMatch) Match(st KeyStructer, k ArgIndex, arg string) (KeyArg, error)
Click to show internal directories.
Click to hide internal directories.