generators

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedFileType = errors.New("unsupported file type")

Functions

func Build

func Build(data any, templateName, templateContent string) (string, error)

func BuildFile

func BuildFile(data any, templateName, templateContent, outputPath string) error

func CreateFilesMap

func CreateFilesMap(files []config.File) map[string]File

func GenerateFile

func GenerateFile(templatesMap map[string]string, fileName, fileTmpl, outputFile string, data any) error

func GenerateFiles

func GenerateFiles(templatesMap map[string]string, filesMap map[string]File, data any, output string) error

Types

type File

type File struct {
	Tmpl    string
	Imports []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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