template

package
v0.0.0-...-3e59879 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(opt *Options) (err error)

func PrintList

func PrintList() error

Types

type Data

type Data struct {
	ProjectName        string
	PackageName        string
	AuthorName         string
	AuthorEmail        string
	AuthorNameAndEmail string
	OutputFile         string
}

Data will be embedded into the tmpl files during the installation

type Options

type Options struct {
	Data
	Logger       *clilogger.CLILogger
	TemplateName string
	TargetDir    string
	InitGit      bool
}

Options for installing a template

type Template

type Template struct {
	// Template details
	Name        string `json:"name"`
	ShortName   string `json:"shortname"`
	Author      string `json:"author"`
	Description string `json:"description"`
	HelpURL     string `json:"helpurl"`

	// Other data
	FS gofs.FS `json:"-"`
}

Template holds data relating to a template including the metadata stored in template.json

func Templates

func Templates() ([]Template, error)

Templates returns the list of available templates

Jump to

Keyboard shortcuts

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