rorgenerator

package
v1.4.21 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

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

func (g Generator) FileExists(filePath string) bool

fileExists checks if a file exists and is not a directory before we try using it to prevent further errors.

func (Generator) TemplateFile

func (g Generator) TemplateFile(filepath string, data any)

templateFile will generate the file regardless if it exists or not

func (Generator) TemplateFileOnce

func (g Generator) TemplateFileOnce(filepath string, templatePath string, data any)

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

func (g Generator) TemplateToFile(filepath string, templatePath string, data any)

templateToFile will generate a file from a template to a specific path

func (Generator) TouchFile

func (g Generator) TouchFile(filePath string) error

touchFile will create a file if it does not exist

Jump to

Keyboard shortcuts

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