Documentation ¶
Index ¶
- Constants
- func IfEmpty(val interface{}, values ...interface{}) interface{}
- func IsEmpty(val interface{}) bool
- func IsMap(val interface{}) bool
- func IsSlice(val interface{}) bool
- func MixAsset(publicPath string) func(val string) string
- func NoCache(file string) string
- func StrListIncludes(str string, list []string) bool
- type Action
- type Attr
- type Config
- type Document
- type IncludeFile
- type Tag
- type TagAttr
- type XTemplate
- func (s *XTemplate) AddFunc(name string, fn interface{}) *XTemplate
- func (s *XTemplate) Delims(left, right string) *XTemplate
- func (s *XTemplate) Funcs(funcMap template.FuncMap) *XTemplate
- func (s *XTemplate) ListFuncs()
- func (s *XTemplate) Lookup(name string) *template.Template
- func (s *XTemplate) ParseFile(name string) error
- func (s *XTemplate) Render(wr io.Writer, name string, data interface{}, ignoreCache bool) error
- func (s *XTemplate) RenderString(tplStr string, data interface{}) (string, error)
Constants ¶
View Source
const ( OpeningTag tagType = iota ClosingTag )
View Source
const ( OpeningAction actionType = iota ClosingAction SingleAction )
Variables ¶
This section is empty.
Functions ¶
func IfEmpty ¶
func IfEmpty(val interface{}, values ...interface{}) interface{}
IfEmpty if val is empty return the first non-empty item in values
func IsEmpty ¶
func IsEmpty(val interface{}) bool
IsEmpty returns true if val is nil empty (nil or a zero value for its type)
func MixAsset ¶
MixAsset reads a laravel-mix mix-manifest.json file and returns the hashed filename. assumes that the file will be in ./static
func StrListIncludes ¶
Types ¶
type Document ¶
type Document []byte
func (*Document) AppendString ¶
func (*Document) CutAndInsert ¶
type IncludeFile ¶
type IncludeFile string
func (IncludeFile) FromTemplateAction ¶
func (i IncludeFile) FromTemplateAction() bool
func (IncludeFile) Name ¶
func (i IncludeFile) Name() string
func (*IncludeFile) SetTemplateActionFlag ¶
func (i *IncludeFile) SetTemplateActionFlag()
func (IncludeFile) String ¶
func (i IncludeFile) String() string
type Tag ¶
type XTemplate ¶
type XTemplate struct {
// contains filtered or unexported fields
}
XTemplate ...
func (*XTemplate) AddFunc ¶
AddFunc add a function the template's function map. must be called before templates are parsed
func (*XTemplate) Delims ¶
Delims sets the template delimiters to the specified strings, must be called before templates are parsed
func (*XTemplate) Funcs ¶
Funcs adds the elements of the argument map to the template's function map. must be called before templates are parsed
Click to show internal directories.
Click to hide internal directories.