files

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(projectInfo *models.ProjectInfo) error

Generate creates files from templates and move pre-made files

Types

type File

type File struct {
	File *os.File
	Tmpl *template.Template
	*models.Document
}

func NewFile

func NewFile(doc *models.Document) *File

func (*File) Create

func (t *File) Create() error

Create creates file in the path

func (*File) Generate

func (t *File) Generate(embedFiles embed.FS) (err error)

Generate creates new files from the embed files with data if it's a template

func (*File) Get

func (t *File) Get(embedFiles embed.FS) error

Get parses the file (or the template file) from the embed files

func (*File) Write

func (t *File) Write() error

Write writes tempate data to file

Jump to

Keyboard shortcuts

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