tpl

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL