From 13d46e7e593916effc2ca7d636a1c58352bad0bf Mon Sep 17 00:00:00 2001 From: George Kelly Date: Mon, 27 Nov 2017 20:10:58 +0000 Subject: Added documentation for exclude flag --- docs/content/usage.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'docs') diff --git a/docs/content/usage.md b/docs/content/usage.md index 3fdd6731..341877fb 100644 --- a/docs/content/usage.md +++ b/docs/content/usage.md @@ -43,6 +43,21 @@ Example: gomplate --input-dir=templates --output-dir=config --datasource config=config.yaml ``` +### `--exclude` + +To prevent certain files from being processed, you can use `--exclude`. It takes a glob, and any files matching that glob will not be included. + +Example: + +``` +gomplate --exclude example/** \ + --exclude *.png +``` + +This will stop all files in the example folder from being processed, as well as all .png files in the root folder. + +You can also chain the exclude flag to build up a series of globs to be excluded + ## `--datasource`/`-d` Add a data source in `name=URL` form. Specify multiple times to add multiple sources. The data can then be used by the [`datasource`](../functions/#datasource) and [`include`](../functions/#include) functions. -- cgit v1.2.3