template

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MLnone file does not have a mode line.
	MLnone = iota
	// MLrender file mode line instruction to render.
	MLrender
	// MLnorender file mode line instruction not to render.
	MLnorender
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Template

type Template struct {
	Config         *config.File
	Log            *log.Logger
	ModeLineLen    uint8
	RenderCurrent  string
	RenderersAvail map[string]renderer.Renderer
	Stderr         io.Writer
	Stdout         io.Writer
	TemplateDir    string
	Variables      *variables.Variables
	// contains filtered or unexported fields
}

Template the template itself

func (*Template) Run

func (t *Template) Run() int

Run generates the target directory structure

func (*Template) SetDest

func (t *Template) SetDest(dest string)

SetDest sets the destination path

func (*Template) SetRender

func (t *Template) SetRender(renderer string)

SetRender set rendering engine

func (*Template) SetSrc

func (t *Template) SetSrc(name string)

SetSrc sets the source template "name". "name" is defined in *config.Config.TemplateURLs. *config.Config is provided as an Option to New.

func (*Template) SetSrcDest

func (t *Template) SetSrcDest(src, dest string)

SetSrcDest sets the source template and destination path where the project structure will reside.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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