template

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultTemplate, _ = Parse("{{ .Prompt }}")

Functions

func Named

func Named(s string) (*named, error)

Types

type Template

type Template struct {
	*template.Template
	// contains filtered or unexported fields
}

func Parse

func Parse(s string) (*Template, error)

func (*Template) Execute added in v0.2.2

func (t *Template) Execute(w io.Writer, v Values) error

func (*Template) String

func (t *Template) String() string

func (*Template) Vars

func (t *Template) Vars() []string

type Values added in v0.2.2

type Values struct {
	Messages []api.Message
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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