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

fix: fix output issue

上级 e5108ac0
......@@ -67,7 +67,7 @@ var apiCmd *cobra.Command = &cobra.Command{
WriteToFile("api.dot", dotContent)
cmd := exec.Command("dot", []string{"-Tsvg", "api.dot", "-o", "api.svg"}...)
cmd := exec.Command("dot", []string{"-Tsvg", "coca_reporter/api.dot", "-o", "coca_reporter/api.svg"}...)
_, err := cmd.CombinedOutput()
if err != nil {
log.Fatalf("cmd.Run() failed with %s\n", err)
......@@ -96,7 +96,7 @@ func init() {
rootCmd.AddCommand(apiCmd)
apiCmd.PersistentFlags().StringP("path", "p", "", "path")
apiCmd.PersistentFlags().StringP("dependence", "d", "", "get dependence file")
apiCmd.PersistentFlags().StringP("dependence", "d", "coca_reporter/deps.json", "get dependence file")
apiCmd.PersistentFlags().StringVarP(&apiCmdConfig.RemovePackageNames, "remove", "r", "", "remove package name")
apiCmd.PersistentFlags().BoolVarP(&apiCmdConfig.ShowCount, "count", "c", false, "count api size")
}
......@@ -37,7 +37,7 @@ var callGraphCmd *cobra.Command = &cobra.Command{
WriteToFile("call.dot", content)
cmd := exec.Command("dot", []string{"-Tsvg", "call.dot", "-o", "call_demo.svg"}...)
cmd := exec.Command("dot", []string{"-Tsvg", "coca_reporter/call.dot", "-o", "coca_reporter/call.svg"}...)
_, err := cmd.CombinedOutput()
if err != nil {
log.Fatalf("cmd.Run() failed with %s\n", err)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册