When I review the cryptogen(a fabric command) config file . I saw there symbol.
Profiles: SampleInsecureSolo: Orderer: <<: *OrdererDefaults ## what is the `<<` Organizations: - *ExampleCom ## what is the `*` Consortiums: SampleConsortium: Organizations: - *Org1ExampleCom - *Org2ExampleCom Above there a two symbol << and *.
Application: &ApplicationDefaults # what is the `&` mean Organizations: As you can see there is another symbol &. I don't know what are there mean. I didn't get any information even by reviewing the source code (fabric/common/configtx/tool/configtxgen/main.go)
Coordinating conjunctions allow you to join words, phrases, and clauses of equal grammatical rank in a sentence. The most common coordinating conjunctions are for, and, nor, but, or, yet, and so; you can remember them by using the mnemonic device FANBOYS. I'd like pizza or a salad for lunch.
And is a coordinating conjunction. We use and to connect two words, phrases, clauses or prefixes together: Televisions and computers are dominating our daily life. ( noun + noun)
As detailed above, 'and' is a conjunction. Conjunction usage: Boys and girls come out to play.
\ ˈand \ Definition of AND (Entry 2 of 2) : a logical operator that requires both of two inputs to be present or two conditions to be met for an output to be made or a statement to be executed.
Well, those are elements of the YAML file format, which is used here to provide a configuration file for configtxgen. The "&" sign mean anchor and "*" reference to the anchor, this is basically used to avoid duplication, for example:
person: &person name: "John Doe" employee: &employee << : *person salary : 5000 will reuse fields of person and has similar meaning as:
employee: &employee name : "John Doe" salary : 5000 another example is simply reusing value:
key1: &key some very common value key2: *key equivalent to:
key1: some very common value key2: some very common value Since abric/common/configtx/tool/configtxgen/main.go uses of the shelf YAML parser you won't find any reference to these symbols in configtxgen related code. I would suggest to read a bit more about YAML file format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With