layout

package
v0.1.17 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderTemplateTree

func RenderTemplateTree(ctx *gencontext.GenContext, model interface{}, params RenderParams) error

Types

type LayoutStep

type LayoutStep struct {
}

func NewLayoutStep

func NewLayoutStep() LayoutStep

func (LayoutStep) Execute

func (s LayoutStep) Execute(ctx *gencontext.GenContext) (core.StepResult, error)

func (LayoutStep) Name

func (s LayoutStep) Name() string

type PathTransformerFunc

type PathTransformerFunc func(context interface{}, path string) (string, error)

type RenderParams

type RenderParams struct {
	// Path to directory with templates tree
	TemplatesPath string

	// Path to save result
	TargetPath string

	// Allows to overwrite the path of file or directory before moving result to target directory
	PathTransformer PathTransformerFunc

	FuncMap template.FuncMap
}

Jump to

Keyboard shortcuts

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