From 6ee72aa0651bc0e6a5bce2c9ee5bd5c7fcd82558 Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sat, 6 Apr 2019 09:04:01 -0400 Subject: Fixing merge behaviour for booleans Signed-off-by: Dave Henderson --- docs/content/datasources.md | 5 ++++- docs/content/functions/coll.md | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/content/datasources.md b/docs/content/datasources.md index d662c124..8a900149 100644 --- a/docs/content/datasources.md +++ b/docs/content/datasources.md @@ -61,7 +61,7 @@ Gomplate supports a number of datasources, each specified with a particular URL | [Environment](#using-env-datasources) | `env` | Environment variables can be used as datasources - useful for testing | | [File](#using-file-datasources) | `file` | Files can be read in any of the [supported formats](#mime-types), including by piping through standard input (`Stdin`). [Directories](#directory-datasources) are also supported. | | [HTTP](#using-http-datasources) | `http`, `https` | Data can be sourced from HTTP/HTTPS sites in many different formats. Arbitrary HTTP headers can be set with the [`--datasource-header`/`-H`][] flag | -| [Merged Datasources](#using-merge-datasources) | `merge` | Merge two or more datasources together to produce the final value - useful for resolving defaults. | +| [Merged Datasources](#using-merge-datasources) | `merge` | Merge two or more datasources together to produce the final value - useful for resolving defaults. Uses [`coll.Merge`][] for merging. | | [Stdin](#using-stdin-datasources) | `stdin` | A special case of the `file` datasource; allows piping through standard input (`Stdin`) | | [Vault](#using-vault-datasources) | `vault`, `vault+http`, `vault+https` | [HashiCorp Vault][] is an industry-leading open-source secret management tool. [List support](#directory-datasources) is also available. | @@ -371,6 +371,8 @@ datasource values _override_ those to the right). Multiple different formats can be mixed, as long as they produce maps with string keys as their data type. +The [`coll.Merge`][] function is used to perform the merge operation. + ### Merging separately-defined datasources Consider this example: @@ -528,6 +530,7 @@ The file `/tmp/vault-aws-nonce` will be created if it didn't already exist, and [`data.JSONArray`]: ../functions/data/#data-jsonarray [`data.TOML`]: ../functions/data/#data-toml [`data.YAML`]: ../functions/data/#data-yaml +[`coll.Merge`]: ../functions/coll/#coll-merge [AWS SMP]: https://aws.amazon.com/systems-manager/features#Parameter_Store [BoltDB]: https://github.com/boltdb/bolt diff --git a/docs/content/functions/coll.md b/docs/content/functions/coll.md index 5e4a6b7d..0aa9b80b 100644 --- a/docs/content/functions/coll.md +++ b/docs/content/functions/coll.md @@ -382,7 +382,7 @@ map can be configured the "overrides". Many source maps can be provided. Precedence is in left-to-right order. -Note that this function _changes_ the destination map. +_Note that this function does not modify the input._ ### Usage -- cgit v1.2.3