diff --git a/README.md b/README.md index c103b5e..b082b9e 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The plugin can generate files based on a template directory using the [Golang's `protoc-gen-gotemplate` requires a **template_dir** directory *(by default `./templates`)*. -Every files ending with `.tmpl` will be processed and written in the destination folder, following the file hierarchy of the `template_dir`, and removing the `.tmpl` extension. +Every files ending with `.tmpl` will be processed and written in the destination folder, following the file hierarchy of the `template_dir`, and removing the `.tmpl` extension. --- @@ -38,6 +38,28 @@ $> protoc --gotemplate_out=debug=true,template_dir=/path/to/template/directory:. See [examples](./examples). +## Funcmap + +This project uses [moul/funcmap](https://github.com/moul/funcmap) library to extend the builtin [text/template](https://golang.org/pkg/text/template) helpers. + +Non-exhaustive list of new helpers: + +* `json` +* `prettyjson` +* `indent` +* `split` +* `join` +* `title` +* `unexport` +* `add` +* `trimspace` +* `lower` +* `upper` +* `rev` +* `int` + +See the project for the complete list. + ## Install * Install the **Go** compiler and tools from https://golang.org/doc/install