Documentation
¶
Index ¶
- type Generator
- func (g Generator) FileExists(filePath string) bool
- func (g Generator) TemplateFile(filepath string, data any)
- func (g Generator) TemplateFileOnce(filepath string, templatePath string, data any)
- func (g Generator) TemplateToFile(filepath string, templatePath string, data any)
- func (g Generator) TouchFile(filePath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
}
func NewGenerator ¶
func NewGenerator() *Generator
func (Generator) FileExists ¶
fileExists checks if a file exists and is not a directory before we try using it to prevent further errors.
func (Generator) TemplateFile ¶
templateFile will generate the file regardless if it exists or not
func (Generator) TemplateFileOnce ¶
templateFileOnce will only generate the file if it does not exist if the file exists it will print a message to the console
func (Generator) TemplateToFile ¶
templateToFile will generate a file from a template to a specific path
Click to show internal directories.
Click to hide internal directories.