views

package module
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecimalFromString added in v1.1.3

func DecimalFromString(x string) decimal.Decimal

func DecimalToString added in v1.1.3

func DecimalToString(x decimal.Decimal) string

func MultiplicationDecimal added in v1.1.2

func MultiplicationDecimal(n1, n2 decimal.Decimal) decimal.Decimal

func MultiplicationDecimalFix added in v1.1.2

func MultiplicationDecimalFix(fix int32, n1, n2 decimal.Decimal) string

func MultiplicationDecimalString added in v1.1.3

func MultiplicationDecimalString(n1, n2 string) string

func MultiplicationDecimalStringFix added in v1.1.3

func MultiplicationDecimalStringFix(fix int32, n1, n2 string) string

Types

type Config

type Config struct {
	//Dir specifies the path to the directory with templates
	Dir string

	//Extensions specifies what file extensions the templates have
	Extensions []string

	//Compress specifies whether to compress templates
	//true - compresses templates during parsing
	//false - does not compress templates
	Compress bool

	//Dev enable/disable development mode
	//true  - parses templates every time
	//false - parses templates once at the very beginning
	Dev bool

	Log              LogFunc
	VersionFilePatch string
	VersionSize      int
}

type LogFunc added in v1.1.0

type LogFunc func(string)

type Views

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

func New

func New(cfg Config) *Views

func (*Views) Execute

func (v *Views) Execute(wr io.Writer, name string, data interface{}) error

func (*Views) Func

func (v *Views) Func(fn template.FuncMap) error

func (*Views) Load

func (v *Views) Load() error

Jump to

Keyboard shortcuts

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