render

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderOrMigrateTemplate added in v0.1.1

func RenderOrMigrateTemplate(
	templateText string,
	model interface{},
	targetPath string,
	migrateSettings MigrateSettings) error

func RenderOrSkipTemplate

func RenderOrSkipTemplate(templateText string, model interface{}, targetPath string) error

func RenderTemplate

func RenderTemplate(templateText string, model interface{}, targetPath string) error

func WrapError

func WrapError(text string, err error) error

Types

type MigrateSettings added in v0.1.1

type MigrateSettings struct {
	Migrate              bool
	HasUncommitedChanges func() (bool, error)
	Migrations           []MigrationCallback
}

type MigrationCallback added in v0.1.1

type MigrationCallback func(string, interface{}, string) (string, error)

func(templateText, model, currentText) => migratedText

Jump to

Keyboard shortcuts

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