其他分享
首页 > 其他分享> > yaml描点

yaml描点

作者:互联网

yaml描点:

yaml文件内容:

defaults: &defaults
adapter: postgres
host: localhost

development:
database: myapp_development
<<: *defaults

test:
database: myapp_test
<<: *defaults

 

 

解析结果:

{
'defaults': {
'adapter': 'postgres',
'host': 'localhost'
},
'development': {
'adapter': 'postgres',
'host': 'localhost',
'database': 'myapp_development'
},
'test': {
'adapter': 'postgres',
'host': 'localhost',
'database': 'myapp_test'
}
}

标签:描点,database,adapter,yaml,host,myapp,test,postgres
来源: https://www.cnblogs.com/bigcoolcool/p/16122123.html