part

package
v0.0.0-...-af76324 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 5 Imported by: 2

Documentation

Overview

Copyright (C) 2024 early (LGPL)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config func(*Part)

func Funcs

func Funcs(funcs template.FuncMap) Config

func Includes

func Includes(includes ...compile.Source) Config

func Name

func Name(name string) Config

func OnLoad

func OnLoad(f render.OnLoadFunc) Config

func Source

func Source(source string) Config

func Tag

func Tag(useTag bool) Config

Tag(false) will disable the inclusion of the "custom tag" for this part. When using Web Components, the user-defined name is included in the HTML document. This is also the default behavior for template parts, but you may disable it with this config when it causes problems.

type Part

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

func New

func New(name string, source string, optional ...func(*Part)) *Part

func (*Part) FileDependencies

func (p *Part) FileDependencies() []string

FileDependencies returns a list of absolute paths to files that are used in this part and its dependencies.

func (*Part) IncludeTagName

func (p *Part) IncludeTagName() bool

func (*Part) Includes

func (p *Part) Includes() []compile.Source

func (*Part) Name

func (p *Part) Name() string

func (*Part) OnLoad

func (p *Part) OnLoad() render.OnLoadFunc

func (*Part) Source

func (p *Part) Source() include.Opener

func (*Part) TemplateFuncs

func (p *Part) TemplateFuncs() template.FuncMap

func (*Part) With

func (p *Part) With(optional ...func(*Part)) *Part

With returns a shallow copy of p with all of optional applied to it.

Jump to

Keyboard shortcuts

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