gen

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

README

Generator package

The generator takes

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareContentWithFile

func CompareContentWithFile(sourceBytes []byte, target string) (bool, error)

func New

func New(outputDir string, templatesDir string, system *model.System, userForce bool) (*generator, error)

Types

type DataMap

type DataMap = map[string]any

type IFileWriter

type IFileWriter interface {
	WriteFile(input []byte, target string, force bool) error
	CopyFile(source, target string, force bool) error
}

IFileWriter writes a target file with content

func NewFileWriter

func NewFileWriter(sourceDir, targetDir string) IFileWriter

NewFileWriter creates a new file writer

type Writer

type Writer struct {
	// contains filtered or unexported fields
}

func (Writer) CopyFile

func (w Writer) CopyFile(source, target string, force bool) error

func (*Writer) WriteFile

func (w *Writer) WriteFile(input []byte, target string, force bool) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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