File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,3 +69,24 @@ connection = connect(**config.service)
6969# and some extra things that configure the place to backup to
7070connection.backup_to(config.paths.backup)
7171```
72+
73+ ## Overriding defaults from one file to the next
74+
75+ If values from multiple files overlap (like if ` /etc/paths.yaml ` would contain ` service.port: 80 ` ), things become slightly more complicated.
76+ Confidence uses a predictable precedence of content here: the value that gets loaded last has the highest precedence (or 'wins').
77+ ` loadf ` will load content in the order of the arguments that get passed, so ` service.port ` would be 443, as defined in ` path/to/service.yaml ` .
78+ You can use this behaviour to define defaults somewhere, that get overridden later:
79+
80+ ``` yaml
81+ # some system-wide configuration in /etc/paths.yaml
82+ service.port : 80
83+ paths :
84+ data : /storage/data
85+ backup : /mnt/backup/data
86+ ` ` `
87+
88+ ` ` ` yaml
89+ service :
90+ host : example.com
91+ port : 443
92+ ` ` `
You can’t perform that action at this time.
0 commit comments