()
| 70 | ) |
| 71 | |
| 72 | func init() { |
| 73 | CmdGenerate.Run = runGenerate |
| 74 | CmdGenerate.Flag.StringVar(&privateKeyParam, "private", "", |
| 75 | "Generate config using an existing private key") |
| 76 | CmdGenerate.Flag.StringVar(&source, "source", "", |
| 77 | "Generate config using the specified config template") |
| 78 | CmdGenerate.Flag.StringVar(&minerListenAddr, "miner", "", |
| 79 | "Generate miner config with specified miner address. Conflict with -source param") |
| 80 | CmdGenerate.Flag.StringVar(&testnetRegion, "testnet", testnetCN, |
| 81 | "Generate config using the specified testnet region: cn or w. Default cn. Conflict with -source param") |
| 82 | |
| 83 | addCommonFlags(CmdGenerate) |
| 84 | } |
| 85 | |
| 86 | func askDeleteFile(file string) { |
| 87 | if fileinfo, err := os.Stat(file); err == nil { |
nothing calls this directly
no test coverage detected