main.go
//command line flags
var (
app = kingpin.New("cryptogen", "Utility for generating Hyperledger Fabric key material")
gen = app.Command("generate", "Generate key material")
outputDir = gen.Flag("output", "The output directory in which to place artifacts").Default("crypto-config").String()
configFile = gen.Flag("config", "The configuration template to use").File()
showtemplate = app.Command("showtemplate", "Show the default configuration template")
)
func main() {
kingpin.Version("0.0.1")
switch kingpin.MustParse(app.Parse(os.Args[1:])) {
// "generate" command
case gen.FullCommand():
generate()
// "showtemplate" command
case showtemplate.FullCommand():
fmt.Print(defaultConfig)
os.Exit(0)
}
}generate
peer 组织
orderer 组织
Last updated