smn_str_rendering

package
v0.0.0-...-8887d1c Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERR_INIT_NODATA    = "ERR_INIT_NODATA: %s"
	ERR_FILE_NOT_FOUND = "ERR_FILE_NOT_FOUND: %s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CFWriter

type CFWriter struct {
	IsWriteToConsole bool
	// contains filtered or unexported fields
}

func (*CFWriter) Write

func (this *CFWriter) Write(p []byte) (n int, err error)

type Counter

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

func (*Counter) Iadd

func (this *Counter) Iadd(k string, v int) string

func (*Counter) Idiv

func (this *Counter) Idiv(k string, v int) string

func (*Counter) Iget

func (this *Counter) Iget(k string) int

func (*Counter) Imult

func (this *Counter) Imult(k string, v int) string

func (*Counter) Inot0

func (this *Counter) Inot0(k string) bool

func (*Counter) Isadd

func (this *Counter) Isadd(k string, v int) int

func (*Counter) Isdiv

func (this *Counter) Isdiv(k string, v int) int

func (*Counter) Iset

func (this *Counter) Iset(k string, v int) string

func (*Counter) Ismult

func (this *Counter) Ismult(k string, v int) int

type StrRender

type StrRender struct {
	IsWriteToConsole bool
	IsParsed         bool
	// contains filtered or unexported fields
}

func NewStrRender

func NewStrRender(name string, tplFile ...string) (res *StrRender, err error)

*

  • tplFile[0] is template file path
  • tplFile[1] is template data.

func (*StrRender) ParseData

func (this *StrRender) ParseData(data interface{}, outFile string) error

func (*StrRender) ParseDataToWritter

func (this *StrRender) ParseDataToWritter(data interface{}, writer io.Writer) error

func (*StrRender) ParseFileData

func (this *StrRender) ParseFileData(dataFile, outFile string) error

func (*StrRender) ReadJsFuncs

func (this *StrRender) ReadJsFuncs(jsPath, funcList string) error

Jump to

Keyboard shortcuts

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