github.com/coveo/gotemplate@v2.7.7+incompatible/docs/_usage.md (about) 1 ```text 2 usage: gotemplate [<flags>] <command> [<args> ...] 3 4 An extended template processor for go. 5 6 See: https://github.com/coveo/gotemplate/blob/master/README.md for complete documentation. 7 8 Flags: 9 -h, --help Show context-sensitive help (also try --help-long and --help-man). 10 --color Force rendering of colors event if output is redirected 11 --no-color Force rendering of colors event if output is redirected 12 -v, --version Get the current version of gotemplate 13 --base Turn off all extensions (they could then be enabled explicitly) 14 --razor Option Razor, on by default, --no-razor to disable 15 --extension Option Extension, on by default, --no-extension to disable 16 --math Option Math, on by default, --no-math to disable 17 --sprig Option Sprig, on by default, --no-sprig to disable 18 --data Option Data, on by default, --no-data to disable 19 --logging Option Logging, on by default, --no-logging to disable 20 --runtime Option Runtime, on by default, --no-runtime to disable 21 --utils Option Utils, on by default, --no-utils to disable 22 --net Option Net, on by default, --no-net to disable 23 --os Option OS, on by default, --no-os to disable 24 --delimiters={{,}},@ Define the default delimiters for go template (separate the left, right and razor delimiters by a comma) (--del) 25 -i, --import=file ... Import variables files (could be any of YAML, JSON or HCL format) 26 -V, --var=values ... Import named variables (if value is a file, the content is loaded) 27 -t, --type=TYPE Force the type used for the main context (Json, Yaml, Hcl) 28 -p, --patterns=pattern ... Additional patterns that should be processed by gotemplate 29 -e, --exclude=pattern ... Exclude file patterns (comma separated) when applying gotemplate recursively 30 -o, --overwrite Overwrite file instead of renaming them if they exist (required only if source folder is the same as the target folder) 31 -s, --substitute=exp ... Substitute text in the processed files by applying the regex substitute expression (format: /regex/substitution, the first character acts as separator like in sed, see: Go regexp) or specify that value through 32 GOTEMPLATE_SUBSTITUTES where each substitute is separated by a newline 33 -E, --remove-empty-lines Remove empty lines from the result (--re) 34 -r, --recursive Process all template files recursively 35 -R, --recursion-depth=depth Process template files recursively specifying depth 36 --source=folder Specify a source folder (default to the current folder) 37 --target=folder Specify a target folder (default to source folder) 38 -I, --stdin Force read of the standard input to get a template definition (useful only if GOTEMPLATE_NO_STDIN is set) 39 -f, --follow-symlinks Follow the symbolic links while using the recursive option 40 -P, --print Output the result directly to stdout 41 -d, --disable Disable go template rendering (used to view razor conversion) 42 --accept-no-value Do not consider rendering <no value> as an error (--nv) or env: GOTEMPLATE_NO_VALUE 43 -S, --strict-error-validation Consider error encountered in any file as real error (--strict) or env: GOTEMPLATE_STRICT_ERROR 44 -L, --log-level=level Set the logging level CRITICAL (0), ERROR (1), WARNING (2), NOTICE (3), INFO (4), DEBUG (5) (--ll) 45 --debug-log-level=level Set the debug logging level 0-9 (--dl) or env: GOTEMPLATE_DEBUG 46 --log-simple Disable the extended logging, i.e. no color, no date (--ls) 47 --ignore-missing-import Exit with code 0 even if import does not exist 48 --ignore-missing-source Exit with code 0 even if source does not exist 49 --ignore-missing-paths Exit with code 0 even if import or source do not exist 50 51 Args: 52 [<templates>] Template files or commands to process 53 54 Commands: 55 help [<command>...] 56 Show help. 57 58 59 run [<flags>] [<templates>...] 60 61 --delimiters={{,}},@ Define the default delimiters for go template (separate the left, right and razor delimiters by a comma) (--del) 62 -i, --import=file ... Import variables files (could be any of YAML, JSON or HCL format) 63 -V, --var=values ... Import named variables (if value is a file, the content is loaded) 64 -t, --type=TYPE Force the type used for the main context (Json, Yaml, Hcl) 65 -p, --patterns=pattern ... Additional patterns that should be processed by gotemplate 66 -e, --exclude=pattern ... Exclude file patterns (comma separated) when applying gotemplate recursively 67 -o, --overwrite Overwrite file instead of renaming them if they exist (required only if source folder is the same as the target folder) 68 -s, --substitute=exp ... Substitute text in the processed files by applying the regex substitute expression (format: /regex/substitution, the first character acts as separator like in sed, see: Go regexp) or specify that value through 69 GOTEMPLATE_SUBSTITUTES where each substitute is separated by a newline 70 -E, --remove-empty-lines Remove empty lines from the result (--re) 71 -r, --recursive Process all template files recursively 72 -R, --recursion-depth=depth Process template files recursively specifying depth 73 --source=folder Specify a source folder (default to the current folder) 74 --target=folder Specify a target folder (default to source folder) 75 -I, --stdin Force read of the standard input to get a template definition (useful only if GOTEMPLATE_NO_STDIN is set) 76 -f, --follow-symlinks Follow the symbolic links while using the recursive option 77 -P, --print Output the result directly to stdout 78 -d, --disable Disable go template rendering (used to view razor conversion) 79 --accept-no-value Do not consider rendering <no value> as an error (--nv) or env: GOTEMPLATE_NO_VALUE 80 -S, --strict-error-validation Consider error encountered in any file as real error (--strict) or env: GOTEMPLATE_STRICT_ERROR 81 -L, --log-level=level Set the logging level CRITICAL (0), ERROR (1), WARNING (2), NOTICE (3), INFO (4), DEBUG (5) (--ll) 82 --debug-log-level=level Set the debug logging level 0-9 (--dl) or env: GOTEMPLATE_DEBUG 83 --log-simple Disable the extended logging, i.e. no color, no date (--ls) 84 --ignore-missing-import Exit with code 0 even if import does not exist 85 --ignore-missing-source Exit with code 0 even if source does not exist 86 --ignore-missing-paths Exit with code 0 even if import or source do not exist 87 88 list [<flags>] [<filters>...] 89 Get detailed help on gotemplate functions 90 91 -f, --functions Get detailed help on function 92 -t, --templates List the available templates 93 -l, --long Get detailed list 94 -a, --all List all 95 -c, --category Group functions by category 96 ```