gen

package
v2.0.764 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteTemplate

func ExecuteTemplate(content string, data interface{}) (string, error)

func Exists

func Exists(path string) bool

func WriteFile

func WriteFile(file *TextFile, overwrite bool) error

func WriteFiles

func WriteFiles(files []TextFile, overwrite bool) error

Types

type TextFile

type TextFile struct {
	Path    string
	Content string
}

type Writer

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

func NewWriter

func NewWriter(indentationStr string, leadSpacesIndentationSize int) *Writer

func (*Writer) EmptyLine

func (writer *Writer) EmptyLine()

func (*Writer) Indent

func (writer *Writer) Indent()

func (*Writer) IndentWith

func (writer *Writer) IndentWith(size int)

func (*Writer) Indented

func (writer *Writer) Indented() *Writer

func (*Writer) IndentedWith

func (writer *Writer) IndentedWith(size int) *Writer

func (*Writer) Line

func (writer *Writer) Line(format string, args ...interface{})

func (*Writer) String

func (writer *Writer) String() string

func (*Writer) Unindent

func (writer *Writer) Unindent()

func (*Writer) UnindentWith

func (writer *Writer) UnindentWith(size int)

Jump to

Keyboard shortcuts

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