当我查看 cryptogen
(一个 fabric 命令)配置文件时,我发现了这个符号。
Profiles:
SampleInsecureSolo:
Orderer:
<<: *OrdererDefaults ## what is the `<<`
Organizations:
- *ExampleCom ## what is the `*`
Consortiums:
SampleConsortium:
Organizations:
- *Org1ExampleCom
- *Org2ExampleCom
在上面有两个符号<<
和*
。
Application: &ApplicationDefaults # what is the `&` mean
Organizations:
你可以看到还有一个符号&
。
我不知道它们的含义。即使查看源代码(fabric/common/configtx/tool/configtxgen/main.go
),我也没有得到任何信息。
*
和&
在 yaml spec 中有明确的描述。令人困惑的是<<:
没有被说明清楚。 - spinkus