Is there YAML syntax for sharing part of a list or map?

前端 未结 5 2189
猫巷女王i
猫巷女王i 2020-11-29 01:07

So, I know I can do something like this:

sitelist: &sites
  - www.foo.com
  - www.bar.com

anotherlist: *sites

And have sitelist<

5条回答
  •  没有蜡笔的小新
    2020-11-29 01:25

    To clarify something from the two answers here, this is not supported directly in YAML for lists (but it is supported for dictionaries, see kittemon's answer).

提交回复
热议问题