gotmpl

package
v0.0.0-...-aefa52a Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package gotmpl provides abstractions around text/template to better generate Go files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGoTemplate

func NewGoTemplate(block string) *template.Template

func Render

func Render(w io.Writer, tmpl string, v interface{})

Render renders the given template string with the given key-value pair.

func S

func S(tmpl string, v any) string

S calls Render onto a string.

Types

type M

type M = map[string]interface{}

M describes a key-value map for a template render.

Jump to

Keyboard shortcuts

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