Movatterモバイル変換


[0]ホーム

URL:


lazytemplate

packagestandard library
go1.25.2Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License:BSD-3-ClauseImports:5Imported by:0

Details

Repository

cs.opensource.google/go/go

Links

Documentation

Overview

Package lazytemplate is a thin wrapper over text/template, allowing the useof global template variables without forcing them to be parsed at init.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeTemplate

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

Template is a wrapper around text/template.Template, where the underlyingtemplate will be parsed the first time it is needed.

funcNew

func New(name, textstring) *Template

New creates a new lazy template, delaying the parsing work until it is firstneeded. If the code is being run as part of tests, the template parsing willhappen immediately.

func (*Template)Execute

func (r *Template) Execute(wio.Writer, dataany)error

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp