Skip to main content

ssa

实例名实例描述
Java(consts.Language) "java"
Javascript(consts.Language) "js"
PHP(consts.Language) "php"
Yak(consts.Language) "yak"
函数名函数描述/介绍
ssa.NewFromProgramName
ssa.NewProgramFromDB
ssa.NewResultFromDB
ssa.Parse
ssa.ParseLocalProject
ssa.ParseProject
ssa.YaklangScriptChecking
ssa.withConfigInfo
ssa.withContext
ssa.withDatabasePath
ssa.withDefaultExcludeFunc
ssa.withDescription
ssa.withEntryFile
ssa.withExcludeFile
ssa.withExternLib
ssa.withExternValue
ssa.withLanguage
ssa.withPeepholeSize
ssa.withProcess
ssa.withProgramNamesave to database, please set the program name
ssa.withReCompile
ssa.withSaveToProfile
ssa.withStrictMode

函数定义#

NewFromProgramName#

详细描述#

定义#

NewFromProgramName(programName string) (*Program, error)

参数#

参数名参数类型参数解释
programNamestring

返回值#

返回值(顺序)返回值类型返回值解释
r1*Program
r2error

NewProgramFromDB#

详细描述#

定义#

NewProgramFromDB(programName string) (*Program, error)

参数#

参数名参数类型参数解释
programNamestring

返回值#

返回值(顺序)返回值类型返回值解释
r1*Program
r2error

NewResultFromDB#

详细描述#

定义#

NewResultFromDB(resultID uint) (*SyntaxFlowResult, error)

参数#

参数名参数类型参数解释
resultIDuint

返回值#

返回值(顺序)返回值类型返回值解释
r1*SyntaxFlowResult
r2error

Parse#

详细描述#

定义#

Parse(code string, opts ...Option) (*Program, error)

参数#

参数名参数类型参数解释
codestring
opts...Option

返回值#

返回值(顺序)返回值类型返回值解释
r1*Program
r2error

ParseLocalProject#

详细描述#

定义#

ParseLocalProject(path string, opts ...Option) (Programs, error)

参数#

参数名参数类型参数解释
pathstring
opts...Option

返回值#

返回值(顺序)返回值类型返回值解释
r1Programs
r2error

ParseProject#

详细描述#

定义#

ParseProject(opts ...Option) (Programs, error)

参数#

参数名参数类型参数解释
opts...Option

返回值#

返回值(顺序)返回值类型返回值解释
r1Programs
r2error

YaklangScriptChecking#

详细描述#

定义#

YaklangScriptChecking(code string, pluginType string) []*result.StaticAnalyzeResult

参数#

参数名参数类型参数解释
codestring
pluginTypestring

返回值#

返回值(顺序)返回值类型返回值解释
r1[]*result.StaticAnalyzeResult

withConfigInfo#

详细描述#

定义#

withConfigInfo(input map[string]any) Option

参数#

参数名参数类型参数解释
inputmap[string]any

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withContext#

详细描述#

定义#

withContext(ctx context.Context) Option

参数#

参数名参数类型参数解释
ctxcontext.Context

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withDatabasePath#

详细描述#

定义#

withDatabasePath(path string) Option

参数#

参数名参数类型参数解释
pathstring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withDefaultExcludeFunc#

详细描述#

定义#

withDefaultExcludeFunc(patterns []string) (Option, error)

参数#

参数名参数类型参数解释
patterns[]string

返回值#

返回值(顺序)返回值类型返回值解释
r1Option
r2error

withDescription#

详细描述#

定义#

withDescription(desc string) Option

参数#

参数名参数类型参数解释
descstring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withEntryFile#

详细描述#

定义#

withEntryFile(files ...string) Option

参数#

参数名参数类型参数解释
files...string

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withExcludeFile#

详细描述#

定义#

withExcludeFile(f func(path, filename string) bool) Option

参数#

参数名参数类型参数解释
ffunc(path, filename string) bool

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withExternLib#

详细描述#

定义#

withExternLib(name string, table map[string]any) Option

参数#

参数名参数类型参数解释
namestring
tablemap[string]any

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withExternValue#

详细描述#

定义#

withExternValue(table map[string]any) Option

参数#

参数名参数类型参数解释
tablemap[string]any

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withLanguage#

详细描述#

定义#

withLanguage(input_language string) Option

参数#

参数名参数类型参数解释
input_languagestring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withPeepholeSize#

详细描述#

定义#

withPeepholeSize(size int) Option

参数#

参数名参数类型参数解释
sizeint

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withProcess#

详细描述#

定义#

withProcess(process ProcessFunc) Option

参数#

参数名参数类型参数解释
processProcessFunc

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withProgramName#

详细描述#

save to database, please set the program name

定义#

withProgramName(name string) Option

参数#

参数名参数类型参数解释
namestring

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withReCompile#

详细描述#

定义#

withReCompile(b bool) Option

参数#

参数名参数类型参数解释
bbool

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withSaveToProfile#

详细描述#

定义#

withSaveToProfile(b ...bool) Option

参数#

参数名参数类型参数解释
b...bool

返回值#

返回值(顺序)返回值类型返回值解释
r1Option

withStrictMode#

详细描述#

定义#

withStrictMode(b bool) Option

参数#

参数名参数类型参数解释
bbool

返回值#

返回值(顺序)返回值类型返回值解释
r1Option