Skip to content

Instantly share code, notes, and snippets.

@freakboy3742
Last active October 15, 2019 13:19
Show Gist options
  • Save freakboy3742/1f801db3d441859e91f6304bad8abe09 to your computer and use it in GitHub Desktop.
Save freakboy3742/1f801db3d441859e91f6304bad8abe09 to your computer and use it in GitHub Desktop.
Inherited properties in TOML
[thing]
name = "demo"
[thing.version_a]
items = ['base1', 'base2', 'first1', 'first2']
[thing.version_b]
items = ['base1', 'base2', 'second1', 'second2']
[thing]
name = "demo"
items = ['base1', 'base2']
[thing.version_a]
items = ['first1', 'first2']
[thing.version_b]
items = ['second1', 'second2']
[thing]
name = "demo"
items = ['base1', 'base2']
[thing.version_a]
items = ['+', 'first1', 'first2']
[thing.version_b]
items = ['+', 'second1', 'second2']
[thing.version_c]
items = ['third1', 'third2']
[thing]
name = "demo"
items = ['base1', 'base2']
[thing.version_a]
sub_items = ['first1', 'first2']
[thing.version_b]
sub_items = ['second1', 'second2']
@rixx
Copy link

rixx commented Oct 15, 2019

What about separate extend vs inherit directives?

“Extend” would do the job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment