databricks-cli/libs/template/testdata
shreyas-goenka fc8729d162
Only treat files with .tmpl extension as templates (#594)
## Changes
In a world before this PR, all files would be treated as `go text
templates`, making the content in these files quake in fear since they
would be executed (as a template).

This PR makes it so that only files with the `.tmpl` extension are
understood to be templates. This is useful for avoiding ambiguity in
cases like where a binary file could be interpreted as a go text
template otherwise.

In order to do so, we introduce the `copyFile` struct which does a copy
of the source file from the template without loading it into memory.

## Tests
Unit tests
2023-08-01 13:43:27 +00:00
..
copy-file-walk/template Only treat files with .tmpl extension as templates (#594) 2023-08-01 13:43:27 +00:00
email Only treat files with .tmpl extension as templates (#594) 2023-08-01 13:43:27 +00:00
executable-bit-read/template Only treat files with .tmpl extension as templates (#594) 2023-08-01 13:43:27 +00:00
fail/template Only treat files with .tmpl extension as templates (#594) 2023-08-01 13:43:27 +00:00
print-without-processing/template Add unit test that raw strings are printed as is (#599) 2023-07-25 17:18:43 +02:00
regexp-compile/template Add regexp compile helper function for templates (#601) 2023-07-25 16:42:53 +02:00
skip/template Only treat files with .tmpl extension as templates (#594) 2023-08-01 13:43:27 +00:00
skip-all-files-in-cwd/template Only treat files with .tmpl extension as templates (#594) 2023-08-01 13:43:27 +00:00
skip-dir-eagerly/template Only treat files with .tmpl extension as templates (#594) 2023-08-01 13:43:27 +00:00
skip-is-relative/template Only treat files with .tmpl extension as templates (#594) 2023-08-01 13:43:27 +00:00
urlparse-function/template Add url parse helper function for templates (#600) 2023-07-27 09:51:31 +00:00
walk/template Only treat files with .tmpl extension as templates (#594) 2023-08-01 13:43:27 +00:00