config

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = NewConfig()

DefaultConfig is a configuration with default values

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug bool
	// The string marking the beginning of a block. Defaults to '{%'
	BlockStartString string
	// The string marking the end of a block. Defaults to '%}'.
	BlockEndString string
	// The string marking the beginning of a print statement. Defaults to '{{'.
	VariableStartString string
	// The string marking the end of a print statement. Defaults to '}}'.
	VariableEndString string
	// The string marking the beginning of a comment. Defaults to '{#'.
	CommentStartString string
	// The string marking the end of a comment. Defaults to '#}'.
	CommentEndString string
	// If given and a string, this will be used as prefix for line based statements.
	// See also Line Statements.
	LineStatementPrefix string
	// If given and a string, this will be used as prefix for line based comments.
	// See also Line Statements.
	LineCommentPrefix string
	// If set to True the XML/HTML autoescaping feature is enabled by default.
	// For more details about autoescaping see Markup.
	// This can also be a callable that is passed the template name
	// and has to return True or False depending on autoescape should be enabled by default.
	Autoescape bool
	// Whether to be strict about undefined attribute or item in an object and return error
	// or return a nil value on missing data and ignore it entirely
	StrictUndefined bool

	// Allow extensions to store some config
	Ext map[string]Inheritable
}

Config holds plexer and parser parameters

func NewConfig

func NewConfig() *Config

func (*Config) Inherit

func (cfg *Config) Inherit() *Config

type Inheritable

type Inheritable interface {
	Inherit() Inheritable
}

Jump to

Keyboard shortcuts

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