Documentation
¶
Overview ¶
Package tpl deploys embedded templates to subdirectories during initialization, handling skip-or-overwrite logic for each file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeployTemplates ¶
func DeployTemplates( cmd *cobra.Command, contextDir string, force bool, p entity.DeployParams, list func() ([]string, error), read func(string) ([]byte, error), ) error
DeployTemplates creates a subdirectory under contextDir and writes embedded templates into it, skipping files that already exist unless force is true.
Parameters:
- cmd: Cobra command for output
- contextDir: The .context/ directory path
- force: If true, overwrite existing files
- p: Deploy parameters (subdirectory and error text keys)
- list: Returns the names of embedded templates
- read: Returns the content of a named template
Returns:
- error: Non-nil if directory creation or file write fails
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.