Referring to a section in TOML

问题内容:

Im YAML I can specify a block and then overwrite it, as follows:

common: &common
  var1: 123
  var2: "fdsfdsfds"
  database: &database
    name: "def_name"
    user_name: "default"
    password: "default"
    adapter: postgres


production:
  <<: *common

  database:
    <<: *database
    name: "prod_db"
    login: "prod_user"
    password: "prod_pass"

How can I do this in TOML? Or how can I accomplish the same thing?

问题评论:

    
Note that << is not standard YAML, but an optional extension to obsolete YAML 1.1. It has never been specified for YAML 1.2.

原文地址:

https://stackoverflow.com/questions/47752359/referring-to-a-section-in-toml

添加评论

友情链接:蝴蝶教程