From 82d6614d2fa3256521a08fc367a638595a641d46 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 3 Oct 2014 08:55:01 -0400 Subject: [PATCH] README: show how to do "inheritance" on one line --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index c2775604..66846526 100644 --- a/README.md +++ b/README.md @@ -564,6 +564,14 @@ You can take advantage of this for "inheritance": Using `include` statements you could split this across multiple files, too. +If you put two objects next to each other (close brace of the first +on the same line with open brace of the second), they are merged, so +a shorter way to write the above "inheritance" example would be: + + data-center-generic = { cluster-size = 6 } + data-center-east = ${data-center-generic} { name = "east" } + data-center-west = ${data-center-generic} { name = "west", cluster-size = 8 } + #### Optional system or env variable overrides In default uses of the library, exact-match system properties