Documentation ¶
Index ¶
- func AppendImports(fSet *token.FileSet, astFile *ast.File, imp []string)
- func BuildDependence(genGoFilePath, genExePath, genTxtPath, code string) error
- func GetAstFileByFuncName(searchPath, name string) (*ast.File, error)
- func GetAstFileByStructName(searchPath, name string) (*ast.File, *ast.StructType, error)
- func GetFunction(funcName string, astFile *ast.File) *ast.FuncDecl
- func GetGOPATH() (gopath string, err error)
- func GetImportPath(pkgName string, astFile *ast.File) (string, error)
- func GoModTidy() error
- func Hash(s string) string
- func KitexGen(genHandler bool, goMod, idlPath, psm string) error
- func MergeImportCfg(genTxtPath, originalCfg, cfg string, isCompilePhase bool) error
- func PathExist(path string) (bool, error)
- func ReplaceFuncBody(targetFunc *ast.FuncDecl, funcBody string)
- func SearchGoMod(cwd string, recurse bool) (moduleName, path string, found bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDependence ¶
BuildDependence store the path of the b001 file obtained by compiling the test code to TEMPDIR/b001.txt
func GetAstFileByStructName ¶
func MergeImportCfg ¶
MergeImportCfg merge tempCfg into originalCfg. When it is the compile step, the cfg parameter should be `importcfg`. When it is the link step, the cfg parameter should be `importcfg.link`.
func ReplaceFuncBody ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.