未验证 提交 cf61e1dc 编写于 作者: P Phodal Huang

refactor: move examples to fixture

上级 f576e635
package main
import (
"encoding/json"
"fmt"
"github.com/phodal/coca/core/adapter/call"
"github.com/phodal/coca/core/adapter/identifier"
"github.com/pkg/profile"
)
func main() {
defer profile.Start(profile.MemProfile, profile.ProfilePath("."), profile.NoShutdownHook)
path := "_fixtures/abug"
identifierApp := identifier.NewJavaIdentifierApp()
iNodes := identifierApp.AnalysisPath(path)
fmt.Println(iNodes)
var classes []string = nil
for _, node := range iNodes {
classes = append(classes, node.Package+"."+node.ClassName)
}
callApp := new(call.JavaCallApp)
callNodes := callApp.AnalysisPath(path, classes, iNodes)
cModel, _ := json.MarshalIndent(callNodes, "", "\t")
fmt.Println(string(cModel))
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册