{"repo":"bluebrown/go-template-cli","free":true,"listed":false,"github":"https://github.com/bluebrown/go-template-cli","clone":"git clone https://github.com/bluebrown/go-template-cli.git","description":"render json, yaml & toml with go templates, from the command line","language":"Go","stars":41,"topics":["golang","cli","go","template","yaml","json","toml","go-template"],"license":"0BSD","category":"cli-tools","readme_excerpt":"Go Template CLI (tpl) Render json, yaml, & toml with go templates from the command line. The templates are executed with the text/template package. This means they come with the additional risks and benefits of the text template engine. Synopsis Input Data The input data is read from stdin via pipe or redirection. It is actually not required to provide any input data. If no input data is provided, the template is executed with nil data. Templates The default templates name is gotpl default and positional arguments are parsed into this root template. That means while its possible to specify multiple arguments, they will overwrite each other unless they use the define keyword to define a named template that can be referenced later when executing the template. If a named template is parsed multiple times, the last one will override the previous ones. Templates from the flags --file and --glob are parsed in the order they are specified. So the override rules of the text/template package apply. If a file with the same name is specified multiple times, the last one wins. Even if they are in different directories. The behavior of the cli tries to stay consistent with the actual behavior of the go template engine. If the default template exists it will be used unless the --name flag is specified. If no default template exists because no positional argument has been provided, the template with the given file name is used, as long as only one file has been parsed. If multiple files hav","default_branch":null,"files":null,"tree":[],"storefront":"/r/bluebrown","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/bluebrown/go-template-cli/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}