整理打印

This commit is contained in:
2025-10-03 00:54:22 +08:00
parent bff7f73d8b
commit 73480005eb
6 changed files with 63 additions and 3 deletions
+5 -1
View File
@@ -78,6 +78,8 @@ func (s *Pb2Port) run(_ *cobra.Command, arg []string) {
return
}
if err == nil {
abs1, _ := filepath.Abs(s.out)
fmt.Printf("[warn] 原文件已存在 > %s:1\n", abs1)
s.out = filepath.Base(s.out)[:len(filepath.Base(s.out))-len(filepath.Ext(s.out))]
s.out = s.out + "_gen.erl"
}
@@ -91,7 +93,9 @@ func (s *Pb2Port) run(_ *cobra.Command, arg []string) {
log.Printf("Err 写入文件失败: %v", err)
return
}
fmt.Println("ok")
abs, _ := filepath.Abs(s.out)
fmt.Printf(" \n生成文件\n > %s:0\n", abs)
}
func init() {
var singleSet = new(Pb2Port)