正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
@@ -12,7 +12,6 @@ import ( | @@ -12,7 +12,6 @@ import ( | ||
12 | "os" | 12 | "os" |
13 | ) | 13 | ) |
14 | 14 | ||
15 | - | ||
16 | /*func init(){ | 15 | /*func init(){ |
17 | var bits int | 16 | var bits int |
18 | flag.IntVar(&bits, "b", 1024, "密钥长度,默认为1024位") | 17 | flag.IntVar(&bits, "b", 1024, "密钥长度,默认为1024位") |
@@ -46,7 +45,9 @@ func main() { | @@ -46,7 +45,9 @@ func main() { | ||
46 | flag.StringVar(&errFilePath, "errFilePath", "", "errFilePath") | 45 | flag.StringVar(&errFilePath, "errFilePath", "", "errFilePath") |
47 | flag.StringVar(&resultFilePath, "resultFilePath", "", "resultFilePath") | 46 | flag.StringVar(&resultFilePath, "resultFilePath", "", "resultFilePath") |
48 | flag.Parse() | 47 | flag.Parse() |
49 | - | 48 | + if key == "" || iv == "" || privateKeyPath == "" || publicKeyPath == "" || ip == "" || bussinessCode == "" || ptCode == "" || reqBody == "" || resultFilePath == "" || errFilePath == "" { |
49 | + os.Exit(1) | ||
50 | + } | ||
50 | 51 | ||
51 | fd, _ := os.OpenFile(errFilePath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0644) | 52 | fd, _ := os.OpenFile(errFilePath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0644) |
52 | defer fd.Close() | 53 | defer fd.Close() |
请
注册
或
登录
后发表评论