Describe the issue
I would like to lowercase the variable input from user when creating from a custom template
Configuration
I tired with a library/template.tmpl file with the following content:
{{ define `project_name_clean` -}}
{{- strings.ToLower ((regexp `-`).ReplaceAllString ((regexp `[^A-Za-z0-9_-]`).ReplaceAllString (print .project_name) ``) `_`) -}}
{{- end }}
Steps to reproduce the behavior
Please list the steps required to reproduce the issue, for example:
- Create a simple custom template
- Run databricks bundle init your_template
- Error: template: variables.tmpl:2: function "strings" not defined
Expected Behavior
I see it's probably because this function isn't support by the go template (not very familiar with it tbh)
Actual Behavior
If it's possible: more docs around possible functions to use in custom templates.
If not possible to achieve; then it would be a good addition to custom templates.
OS and CLI version
Please provide the version of the CLI (eg: v0.1.2) and the operating system (eg: windows). You can run databricks --version to get the version of your Databricks CLI
Describe the issue
I would like to lowercase the variable input from user when creating from a custom template
Configuration
I tired with a library/template.tmpl file with the following content:
Steps to reproduce the behavior
Please list the steps required to reproduce the issue, for example:
Expected Behavior
I see it's probably because this function isn't support by the go template (not very familiar with it tbh)
Actual Behavior
If it's possible: more docs around possible functions to use in custom templates.
If not possible to achieve; then it would be a good addition to custom templates.
OS and CLI version
Please provide the version of the CLI (eg: v0.1.2) and the operating system (eg: windows). You can run databricks --version to get the version of your Databricks CLI