Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*sourceCodeHandlerImpl)
func WithAssetPath ¶
func WithSkipDirs ¶
// WithEntrySignature 定义服务调用函数签名, 方便定位哪个文件需要patch来添加模块所在包的导入路径
func WithParseSignature(signature string) Option { return func(m *sourceCodeHandlerImpl) error { if signature == "" { return errors.New("patch file signature not specified") } tokens := strings.Split(signature, ".") if len(tokens) != 2 { return errors.New("invalid signature format, format: caller.functionChain") } importPath, functionChain := strings.TrimSpace(tokens[0]), strings.TrimSpace(tokens[1]) if importPath == "" || functionChain == "" { return errors.New("empty import path or function chain") } m.signature = &callSignature{ caller: importPath, functionChain: functionChain, } return nil } }
type SourceCodeHandler ¶
type SourceCodeHandler interface {
Handle() error
}
Click to show internal directories.
Click to hide internal directories.